lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tools/thermal: remove unneeded variable
Date
From: ran jianping <ran.jianping@zte.com.cn>

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

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
tools/thermal/tmon/pid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/thermal/tmon/pid.c b/tools/thermal/tmon/pid.c
index c54edb4f630c..296f69c00c57 100644
--- a/tools/thermal/tmon/pid.c
+++ b/tools/thermal/tmon/pid.c
@@ -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)
--
2.25.1
\
 
 \ /
  Last update: 2021-11-12 10:11    [W:0.446 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site