Skip to contentSkip to conversation

tools/thermal: remove unneeded variable

PATCH Applied [email protected] 2 participants 2 messages Nov 12, 2021 – Nov 24, 2021 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/thermal: remove unneeded variable

From: ran jianping <[email protected]>

Fix the following coccicheck review:
/tools/thermal/tmon/pid.c:57:5-8: Unneeded variable

Remove unneeded variable used to store return value.

---
 tools/thermal/tmon/pid.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/thermal/tmon/pid.c +1 -2
index c54edb4f630c..296f69c00c57 100644
@@ -54,7 +54,6 @@ static double xk_1, xk_2; /* input temperature x[k-#] */
  */
 int init_thermal_controller(void)
 {
-	int ret = 0;
 
 	/* init pid params */
 	p_param.ts = ticktime;
@@ -65,7 +64,7 @@ int init_thermal_controller(void)
 
 	p_param.t_target = target_temp_user;
 
-	return ret;
+	return 0;
 }
 
 void controller_reset(void)
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 27 lines · On Fri, Nov 12, 2021 at 10:09 AM <[email protected]> wrote:

From: ran jianping <[email protected]>

Fix the following coccicheck review:
/tools/thermal/tmon/pid.c:57:5-8: Unneeded variable

Remove unneeded variable used to store return value.

---
 tools/thermal/tmon/pid.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/thermal/tmon/pid.c +0 -1
index c54edb4f630c..296f69c00c57 100644
@@ -54,7 +54,6 @@ static double xk_1, xk_2; /* input temperature x[k-#] */
  */
 int init_thermal_controller(void)
 {
-       int ret = 0;
 
        /* init pid params */
        p_param.ts = ticktime;

tools/thermal/tmon/pid.c int init_thermal_controller(void)

Quoted 9 lines
tools/thermal/tmon/pid.c +1 -2
@@ -65,7 +64,7 @@ int init_thermal_controller(void)
 
        p_param.t_target = target_temp_user;
 
-       return ret;
+       return 0;
 }
 
 void controller_reset(void)
--

Applied as 5.17 material, thanks!