public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] thermal: gov_step_wise: Simplify checks related to passive trips
Date: Thu, 4 Apr 2024 12:26:36 +0100	[thread overview]
Message-ID: <6f950b18-4ff7-4570-957d-49b46167c12e@arm.com> (raw)
In-Reply-To: <2318465.ElGaqSPkdT@kreacher>



On 4/3/24 19:12, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Make it more clear from the code flow that the passive polling status
> updates only take place for passive trip points.
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>   drivers/thermal/gov_step_wise.c |   14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)
> 
> Index: linux-pm/drivers/thermal/gov_step_wise.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/gov_step_wise.c
> +++ linux-pm/drivers/thermal/gov_step_wise.c
> @@ -92,15 +92,13 @@ static void thermal_zone_trip_update(str
>   		if (instance->initialized && old_target == instance->target)
>   			continue;
>   
> -		if (old_target == THERMAL_NO_TARGET &&
> -		    instance->target != THERMAL_NO_TARGET) {
> -			/* Activate a passive thermal instance */
> -			if (trip->type == THERMAL_TRIP_PASSIVE)
> +		if (trip->type == THERMAL_TRIP_PASSIVE) {
> +			/* If needed, update the status of passive polling. */
> +			if (old_target == THERMAL_NO_TARGET &&
> +			    instance->target != THERMAL_NO_TARGET)
>   				tz->passive++;
> -		} else if (old_target != THERMAL_NO_TARGET &&
> -			   instance->target == THERMAL_NO_TARGET) {
> -			/* Deactivate a passive thermal instance */
> -			if (trip->type == THERMAL_TRIP_PASSIVE)
> +			else if (old_target != THERMAL_NO_TARGET &&
> +				 instance->target == THERMAL_NO_TARGET)
>   				tz->passive--;
>   		}
>   
> 
> 
> 

The patch looks good, although I got some warning while applying with
my b4 tool:
BADSIG: DKIM/rjwysocki.net

Anyway, it looks like false warning IMO.

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

  reply	other threads:[~2024-04-04 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 18:09 [PATCH v1 0/2] thermal: gov_step_wide: Two cleanups Rafael J. Wysocki
2024-04-03 18:11 ` [PATCH v1 1/2] thermal: gov_step_wise: Simplify get_target_state() Rafael J. Wysocki
2024-04-04 11:15   ` Lukasz Luba
2024-04-03 18:12 ` [PATCH v1 2/2] thermal: gov_step_wise: Simplify checks related to passive trips Rafael J. Wysocki
2024-04-04 11:26   ` Lukasz Luba [this message]
2024-04-04 11:57     ` Rafael J. Wysocki

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=6f950b18-4ff7-4570-957d-49b46167c12e@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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