* [PATCH] tools/thermal: remove unneeded variable
@ 2021-11-12 9:09 cgel.zte
2021-11-24 16:28 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-12 9:09 UTC (permalink / raw)
To: rafael
Cc: daniel.lezcano, amitk, rui.zhang, ran.jianping, linux-pm,
linux-kernel, Zeal Robot
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/thermal: remove unneeded variable
2021-11-12 9:09 [PATCH] tools/thermal: remove unneeded variable cgel.zte
@ 2021-11-24 16:28 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-11-24 16:28 UTC (permalink / raw)
To: cgel.zte
Cc: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang, Rui,
ran.jianping, Linux PM, Linux Kernel Mailing List, Zeal Robot
On Fri, Nov 12, 2021 at 10:09 AM <cgel.zte@gmail.com> wrote:
>
> 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)
> --
Applied as 5.17 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-24 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12 9:09 [PATCH] tools/thermal: remove unneeded variable cgel.zte
2021-11-24 16:28 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).