public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wilczynski, Michal" <michal.wilczynski@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Zhang Rui <rui.zhang@intel.com>, <linux-omap@vger.kernel.org>,
	Amit Kucheria <amitk@kernel.org>, Keerthy <j-keerthy@ti.com>
Subject: Re: [PATCH v1] thermal: Constify the trip argument of the .get_trend() zone callback
Date: Fri, 8 Sep 2023 10:25:19 +0200	[thread overview]
Message-ID: <542d0b86-eb5d-cca5-3c8c-857976ca5adb@intel.com> (raw)
In-Reply-To: <5709115.DvuYhMxLoT@kreacher>



On 9/7/2023 8:18 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.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@intel.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@intel.com>

>


      reply	other threads:[~2023-09-08  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 18:18 [PATCH v1] thermal: Constify the trip argument of the .get_trend() zone callback Rafael J. Wysocki
2023-09-08  8:25 ` Wilczynski, Michal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542d0b86-eb5d-cca5-3c8c-857976ca5adb@intel.com \
    --to=michal.wilczynski@intel.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=j-keerthy@ti.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox