[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <542d0b86-eb5d-cca5-3c8c-857976ca5adb@intel.com>
Date: Fri, 8 Sep 2023 10:25:19 +0200
From: "Wilczynski, Michal" <michal.wilczynski@...el.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux PM <linux-pm@...r.kernel.org>
CC: Linux ACPI <linux-acpi@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>, <linux-omap@...r.kernel.org>,
Amit Kucheria <amitk@...nel.org>, Keerthy <j-keerthy@...com>
Subject: Re: [PATCH v1] thermal: Constify the trip argument of the
.get_trend() zone callback
On 9/7/2023 8:18 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Add 'const' to the definition of the 'trip' argument of the
> .get_trend() thermal zone callback to indicate that the trip point
> passed to it should not be modified by it and adjust the
> callback functions implementing it, thermal_get_trend() in the
> ACPI thermal driver and __ti_thermal_get_trend(), accordingly.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> drivers/acpi/thermal.c | 2 +-
> drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 3 ++-
> include/linux/thermal.h | 4 ++--
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> +++ linux-pm/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
> @@ -110,7 +110,8 @@ static inline int __ti_thermal_get_temp(
> }
>
> static int __ti_thermal_get_trend(struct thermal_zone_device *tz,
> - struct thermal_trip *trip, enum thermal_trend *trend)
> + const struct thermal_trip *trip,
> + enum thermal_trend *trend)
> {
> struct ti_thermal_data *data = thermal_zone_device_priv(tz);
> struct ti_bandgap *bgp;
> Index: linux-pm/include/linux/thermal.h
> ===================================================================
> --- linux-pm.orig/include/linux/thermal.h
> +++ linux-pm/include/linux/thermal.h
> @@ -80,8 +80,8 @@ struct thermal_zone_device_ops {
> int (*set_trip_hyst) (struct thermal_zone_device *, int, int);
> int (*get_crit_temp) (struct thermal_zone_device *, int *);
> int (*set_emul_temp) (struct thermal_zone_device *, int);
> - int (*get_trend) (struct thermal_zone_device *, struct thermal_trip *,
> - enum thermal_trend *);
> + int (*get_trend) (struct thermal_zone_device *,
> + const struct thermal_trip *, enum thermal_trend *);
> void (*hot)(struct thermal_zone_device *);
> void (*critical)(struct thermal_zone_device *);
> };
> Index: linux-pm/drivers/acpi/thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/thermal.c
> +++ linux-pm/drivers/acpi/thermal.c
> @@ -531,7 +531,7 @@ static int thermal_get_temp(struct therm
> }
>
> static int thermal_get_trend(struct thermal_zone_device *thermal,
> - struct thermal_trip *trip,
> + const struct thermal_trip *trip,
> enum thermal_trend *trend)
> {
> struct acpi_thermal *tz = thermal_zone_device_priv(thermal);
>
Looks good to me,
Reviewed-by: Michal Wilczynski <michal.wilczynski@...el.com>
>
Powered by blists - more mailing lists