lkml.org 
[lkml]   [2023]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 01/17] thermal/core: Add a thermal zone 'devdata' accessor
Hi Daniel,

Thanks for your work.

On 2023-02-19 15:36:41 +0100, Daniel Lezcano wrote:
> The thermal zone device structure is exposed to the different drivers
> and obviously they access the internals while that should be
> restricted to the core thermal code.
>
> In order to self-encapsulate the thermal core code, we need to prevent
> the drivers accessing directly the thermal zone structure and provide
> accessor functions to deal with.
>
> Provide an accessor to the 'devdata' structure and make use of it in
> the different drivers.
>
> No functional changes intended.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

...

> drivers/thermal/rcar_gen3_thermal.c | 4 ++--
> drivers/thermal/rcar_thermal.c | 3 +--

For R-Car,

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

...


> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 2bb4bf33f4f3..724b95662da9 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -365,6 +365,8 @@ thermal_zone_device_register_with_trips(const char *, struct thermal_trip *, int
> void *, struct thermal_zone_device_ops *,
> struct thermal_zone_params *, int, int);
>
> +void *thermal_zone_device_get_data(struct thermal_zone_device *tzd);
> +

bikeshedding:

Would it make sens to name this thermal_zone_device_get_priv_data(),
thermal_zone_device_get_priv() or something like that? To make it more
explicitly when reading the driver code this fetches the drivers private
data, and not some data belonging to the zone itself.

> int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
> struct thermal_cooling_device *,

--
Kind Regards,
Niklas Söderlund

\
 
 \ /
  Last update: 2023-03-27 00:28    [W:0.208 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site