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] [day] [month] [year] [list]
Message-ID: <20230213204915.an3khdiczinttp2d@mercury.elektranox.org>
Date:   Mon, 13 Feb 2023 21:49:15 +0100
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:     rjw@...ysocki.net, linux-acpi@...r.kernel.org,
        linux-pm@...r.kernel.org,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Kees Cook <keescook@...omium.org>,
        "Lee, Chun-Yi" <joeyli.kernel@...il.com>,
        Chuansheng Liu <chuansheng.liu@...el.com>,
        ye xingchen <ye.xingchen@....com.cn>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal: Hunt zero trip points thermal zones usage

Hi,

On Fri, Feb 03, 2023 at 06:58:31PM +0100, Daniel Lezcano wrote:
> Some drivers are declaring a thermal zone without any thermal trip
> points.
> 
> On the other side, we are introducing the function
> thermal_zone_device_register_with_trips() which provides an array of
> generic thermal trip points. When all the drivers will be converted to
> the generic trip points, keeping two functions will be useless.
> 
> Most of the drivers are now using
> thermal_zone_device_register_with_trips() with the generic trip
> points. As soon as the remaining drivers are merged, the
> thermal_zone_device_register_with_trips() will be renamed to
> thermal_zone_device_register().
> 
> Obviously this renaming can only happen if there are no more user of
> the thermal_zone_device_register() function.
> 
> This change uses thermal_zone_device_register_with_trips() with a NULL
> parameter for the trip point array instead of
> thermal_zone_device_register().
> 
> No functional change intended.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
>  drivers/power/supply/power_supply_core.c                | 2 +-

Acked-by: Sebastian Reichel <sebastian.reichel@...labora.com>

[...]

> diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
> index 7c790c41e2fe..208a849a71d9 100644
> --- a/drivers/power/supply/power_supply_core.c
> +++ b/drivers/power/supply/power_supply_core.c
> @@ -1166,7 +1166,7 @@ static int psy_register_thermal(struct power_supply *psy)
>  
>  	/* Register battery zone device psy reports temperature */
>  	if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
> -		psy->tzd = thermal_zone_device_register(psy->desc->name,
> +		psy->tzd = thermal_zone_device_register_with_trips(psy->desc->name, NULL,
>  				0, 0, psy, &psy_tzd_ops, NULL, 0, 0);
>  		if (IS_ERR(psy->tzd))
>  			return PTR_ERR(psy->tzd);

[...]

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ