lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1a302e7-5544-407e-9a9d-1a59fdc53dfe@arm.com>
Date: Thu, 4 Sep 2025 08:21:16 +0100
From: Lukasz Luba <lukasz.luba@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Daniel Lezcano <daniel.lezcano@...aro.org>,
 Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] thermal: gov_step_wise: Clean up local variable
 initialization



On 8/25/25 14:27, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Make the initialization of local variable throttle in
> thermal_zone_trip_update() more straightforward.
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>   drivers/thermal/gov_step_wise.c |    6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> --- a/drivers/thermal/gov_step_wise.c
> +++ b/drivers/thermal/gov_step_wise.c
> @@ -69,16 +69,14 @@
>   				     const struct thermal_trip_desc *td,
>   				     int trip_threshold)
>   {
> +	bool throttle = tz->temperature >= trip_threshold;
>   	const struct thermal_trip *trip = &td->trip;
>   	enum thermal_trend trend = get_tz_trend(tz, trip);
>   	int trip_id = thermal_zone_trip_id(tz, trip);
>   	struct thermal_instance *instance;
> -	bool throttle = false;
>   
> -	if (tz->temperature >= trip_threshold) {
> -		throttle = true;
> +	if (throttle)
>   		trace_thermal_zone_trip(tz, trip_id, trip->type);
> -	}
>   
>   	dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n",
>   		trip_id, trip->type, trip_threshold, trend, throttle);
> 
> 
> 


LGTM,

Reviewed-by: Lukasz Luba <lukasz.luba@....com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ