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: <e97e094cf99980f461ba798f7179ce1caea3cf87.camel@intel.com>
Date:   Mon, 04 Jul 2022 22:11:00 +0800
From:   Zhang Rui <rui.zhang@...el.com>
To:     Daniel Lezcano <daniel.lezcano@...exp.org>,
        daniel.lezcano@...aro.org, rafael@...nel.org
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        khilman@...libre.com, abailon@...libre.com,
        Amit Kucheria <amitk@...nel.org>
Subject: Re: [PATCH v3 08/12] thermal/core: Add thermal_trip in thermal_zone

On Sun, 2022-07-03 at 20:30 +0200, Daniel Lezcano wrote:
> The thermal trip points are properties of a thermal zone and the
> different sub systems should be able to save them in the thermal zone
> structure instead of having their own definition.
> 
> Give the opportunity to the drivers to create a thermal zone with
> thermal trips which will be accessible directly from the thermal core
> framework.
> 
> Cc: Alexandre Bailon <abailon@...libre.com>
> Cc: Kevin Hilman <khilman@...libre.com>
> Cc; Eduardo Valentin <eduval@...zon.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...exp.org>
> ---
>  drivers/thermal/thermal_core.h | 10 ++++++++++
>  include/linux/thermal.h        |  1 +
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/thermal/thermal_core.h
> b/drivers/thermal/thermal_core.h
> index c991bb290512..84e341c1e0fc 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -113,6 +113,16 @@ int thermal_build_list_of_policies(char *buf);
>  /* Helpers */
>  void thermal_zone_set_trips(struct thermal_zone_device *tz);
>  
> +static inline struct thermal_trip *thermal_zone_get_trips(struct
> thermal_zone *tz)

it should be struct thermal_zone_device?
It seems that you fixed it in patch 9/12, and leave it broke here.

> +{
> +	return tz->trips;
> +}
> +
> +static inline int thermal_zone_get_ntrips(struct thermal_zone *tz)

same problem as above.

thanks,
rui
> +{
> +	return tz->ntrips;
> +}
> +
>  /* sysfs I/F */
>  int thermal_zone_create_device_groups(struct thermal_zone_device *,
> int);
>  void thermal_zone_destroy_device_groups(struct thermal_zone_device
> *);
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 3a57878a2a6c..3733e23b6359 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -179,6 +179,7 @@ struct thermal_zone_device {
>  	struct thermal_zone_device_ops *ops;
>  	struct thermal_zone_params *tzp;
>  	struct thermal_governor *governor;
> +	struct thermal_trip *trips;
>  	void *governor_data;
>  	struct list_head thermal_instances;
>  	struct ida ida;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ