Re: [PATCH 05/11] thermal: Move set_trips function to the internal header

From: Amit Kucheria
Date: Mon Oct 14 2019 - 10:33:06 EST


On Sat, Oct 12, 2019 at 12:23 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
> The function is not used in other place than the thermal directory. It

Grammar nit: is not used any place other than the thermal directory

> does not make sense to export its definition in the global header as
> there is no use of it.
>
> Move its the definition in the internal header and allow better
> self-encapsulation.

Grammar nit: Move the definition to the internal header

If you respin please fix the same for other patches in the series.




>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> ---
> drivers/thermal/thermal_core.h | 2 ++
> include/linux/thermal.h | 3 ---
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
> index 6f6e0dcba4f2..301f5603def1 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -72,6 +72,8 @@ struct thermal_trip {
> enum thermal_trip_type type;
> };
>
> +void thermal_zone_set_trips(struct thermal_zone_device *tz);
> +
> /*
> * This structure is used to describe the behavior of
> * a certain cooling device on a certain trip point
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 88e1faa3d72c..761d77571533 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -398,7 +398,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
> struct thermal_cooling_device *);
> void thermal_zone_device_update(struct thermal_zone_device *,
> enum thermal_notify_event);
> -void thermal_zone_set_trips(struct thermal_zone_device *);
>
> struct thermal_cooling_device *thermal_cooling_device_register(const char *,
> void *, const struct thermal_cooling_device_ops *);
> @@ -444,8 +443,6 @@ static inline int thermal_zone_unbind_cooling_device(
> static inline void thermal_zone_device_update(struct thermal_zone_device *tz,
> enum thermal_notify_event event)
> { }
> -static inline void thermal_zone_set_trips(struct thermal_zone_device *tz)
> -{ }
> static inline struct thermal_cooling_device *
> thermal_cooling_device_register(char *type, void *devdata,
> const struct thermal_cooling_device_ops *ops)
> --
> 2.17.1
>