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 ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: Re: [PATCH v1 2/5] ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol
Date: Wed, 31 May 2023 09:48:54 +0200	[thread overview]
Message-ID: <d93db4e9-16b4-d20e-0769-d6f9b8826b64@intel.com> (raw)
In-Reply-To: <8222291.T7Z3S40VBb@kreacher>



On 5/30/2023 5:44 PM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Drop the ACPI_TRIPS_REFRESH_DEVICES symbol which is redundant, because
> ACPI_TRIPS_DEVICES can be used directly instead of it without any
> drawbacks and rename the ACPI_TRIPS_REFRESH_THRESHOLDS to
> ACPI_TRIPS_THRESHOLDS to make the code a bit more consistent.
>
> While at it, fix up some formatting white space used in the symbol
> definitions.
>
> No functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/acpi/thermal.c |   13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> Index: linux-pm/drivers/acpi/thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/thermal.c
> +++ linux-pm/drivers/acpi/thermal.c
> @@ -238,12 +238,11 @@ static int acpi_thermal_set_cooling_mode
>  #define ACPI_TRIPS_ACTIVE	BIT(3)
>  #define ACPI_TRIPS_DEVICES	BIT(4)
>  
> -#define ACPI_TRIPS_REFRESH_THRESHOLDS	(ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
> -#define ACPI_TRIPS_REFRESH_DEVICES	ACPI_TRIPS_DEVICES
> +#define ACPI_TRIPS_THRESHOLDS	(ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
>  
> -#define ACPI_TRIPS_INIT      (ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT |	\
> -			      ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE |	\
> -			      ACPI_TRIPS_DEVICES)
> +#define ACPI_TRIPS_INIT		(ACPI_TRIPS_CRITICAL | ACPI_TRIPS_HOT | \
> +				 ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE | \
> +				 ACPI_TRIPS_DEVICES)
>  
>  /*
>   * This exception is thrown out in two cases:
> @@ -906,13 +905,13 @@ static void acpi_thermal_notify(struct a
>  		acpi_queue_thermal_check(tz);
>  		break;
>  	case ACPI_THERMAL_NOTIFY_THRESHOLDS:
> -		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_THRESHOLDS);
> +		acpi_thermal_trips_update(tz, ACPI_TRIPS_THRESHOLDS);
>  		acpi_queue_thermal_check(tz);
>  		acpi_bus_generate_netlink_event(device->pnp.device_class,
>  						dev_name(&device->dev), event, 0);
>  		break;
>  	case ACPI_THERMAL_NOTIFY_DEVICES:
> -		acpi_thermal_trips_update(tz, ACPI_TRIPS_REFRESH_DEVICES);
> +		acpi_thermal_trips_update(tz, ACPI_TRIPS_DEVICES);
>  		acpi_queue_thermal_check(tz);
>  		acpi_bus_generate_netlink_event(device->pnp.device_class,
>  						dev_name(&device->dev), event, 0);
>

Looks good to me,

Reviewed-by: Michal Wilczynski <michal.wilczynski@intel.com>

Also I wonder, whether I should wait with another revision of my patchset 'Remove .notify', since it will
obviously need to be rebased on top of that changes.

>


  reply	other threads:[~2023-05-31  7:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 15:39 [PATCH v1 0/5] ACPI: thermal: Assorted cleanups Rafael J. Wysocki
2023-05-30 15:44 ` [PATCH v1 1/5] ACPI: thermal: Use BIT() macro for defining flags Rafael J. Wysocki
2023-05-31  7:33   ` Wilczynski, Michal
2023-05-30 15:44 ` [PATCH v1 2/5] ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol Rafael J. Wysocki
2023-05-31  7:48   ` Wilczynski, Michal [this message]
2023-05-31 14:48     ` Rafael J. Wysocki
2023-05-30 15:44 ` [PATCH v1 3/5] ACPI: thermal: Move symbol definitions to one place Rafael J. Wysocki
2023-05-31  7:58   ` Wilczynski, Michal
2023-05-30 15:44 ` [PATCH v1 4/5] ACPI: thermal: Move acpi_thermal_driver definition Rafael J. Wysocki
2023-05-31  8:03   ` Wilczynski, Michal
2023-05-30 15:45 ` [PATCH v1 5/5] ACPI: thermal: Eliminate struct acpi_thermal_state_flags Rafael J. Wysocki
2023-05-31  8:20   ` Wilczynski, Michal

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=d93db4e9-16b4-d20e-0769-d6f9b8826b64@intel.com \
    --to=michal.wilczynski@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@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