From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v2 1/2] thermal: core: Do not call handle_thermal_trip() if zone temperature is invalid
Date: Tue, 30 Apr 2024 17:43:58 +0100 [thread overview]
Message-ID: <4f5efb62-b490-4295-bce6-58f63d1287a1@arm.com> (raw)
In-Reply-To: <4902888.GXAFRqVoOG@kreacher>
On 4/30/24 16:45, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Make __thermal_zone_device_update() bail out if update_temperature()
> fails to update the zone temperature because __thermal_zone_get_temp()
> has returned an error and the current zone temperature is
> THERMAL_TEMP_INVALID (user space receiving netlink thermal messages,
> thermal debug code and thermal governors may get confused otherwise).
>
> Fixes: 9ad18043fb35 ("thermal: core: Send trip crossing notifications at init time if needed")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> New patch in v2.
>
> ---
> drivers/thermal/thermal_core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-pm/drivers/thermal/thermal_core.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.c
> +++ linux-pm/drivers/thermal/thermal_core.c
> @@ -487,6 +487,9 @@ void __thermal_zone_device_update(struct
>
> update_temperature(tz);
>
> + if (tz->temperature == THERMAL_TEMP_INVALID)
> + return;
> +
> __thermal_zone_set_trips(tz);
>
> tz->notify_event = event;
>
>
>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2024-04-30 16:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 15:44 [PATCH v2 0/2] thermal: core: Fix thermal zone initialization and move passive polling management to the core Rafael J. Wysocki
2024-04-30 15:45 ` [PATCH v2 1/2] thermal: core: Do not call handle_thermal_trip() if zone temperature is invalid Rafael J. Wysocki
2024-04-30 16:43 ` Lukasz Luba [this message]
2024-04-30 15:52 ` [PATCH v2 2/2] thermal: core: Move passive polling management to the core Rafael J. Wysocki
2024-04-30 16:47 ` Lukasz Luba
2024-04-30 18:32 ` [PATCH v2 0/2] thermal: core: Fix thermal zone initialization and move " Lukasz Luba
2024-04-30 19:15 ` 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=4f5efb62-b490-4295-bce6-58f63d1287a1@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=rafael@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;
as well as URLs for NNTP newsgroup(s).