From: Ido Schimmel <idosch@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: daniel.lezcano@linaro.org, linux-pm@vger.kernel.org,
amitk@kernel.org, rui.zhang@intel.com, mlxsw@nvidia.com,
vadimp@nvidia.com
Subject: Re: [PATCH] thermal: core: Restore behavior regarding invalid trip points
Date: Tue, 14 Mar 2023 20:35:45 +0200 [thread overview]
Message-ID: <ZBC+gUXyTsHHIX8O@shredder> (raw)
In-Reply-To: <CAJZ5v0gKR6xzZUgATEMCGnAgtq3dGo-QyM372yvWqJPMu3r=GQ@mail.gmail.com>
Hi Rafael,
On Tue, Mar 14, 2023 at 07:03:07PM +0100, Rafael J. Wysocki wrote:
> What if the temperature is negative? I think that you'd still want to
> disable the trip in that case, wouldn't you?
Personally, no. This patch merely restores the behavior that was
inadvertently removed by 7c3d5c20dc16. Specifically by this hunk:
```
@@ -1252,9 +1319,10 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
goto release_device;
for (count = 0; count < num_trips; count++) {
- if (tz->ops->get_trip_type(tz, count, &trip_type) ||
- tz->ops->get_trip_temp(tz, count, &trip_temp) ||
- !trip_temp)
+ struct thermal_trip trip;
+
+ result = thermal_zone_get_trip(tz, count, &trip);
+ if (result)
set_bit(count, &tz->trips_disabled);
}
```
> Daniel, what's your take on this?
Discussed this with Daniel yesterday:
https://lore.kernel.org/linux-pm/ZA8TPDpEVanOpjEp@shredder/
We agreed to rework mlxsw to not rely on the fact that trip points with
a zero temperature are disabled, but it's not rc material, unlike this
patch.
Thanks
next prev parent reply other threads:[~2023-03-14 18:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 15:50 [PATCH] thermal: core: Restore behavior regarding invalid trip points Ido Schimmel
2023-03-14 18:03 ` Rafael J. Wysocki
2023-03-14 18:35 ` Ido Schimmel [this message]
2023-03-22 19:04 ` Rafael J. Wysocki
2023-03-23 21:25 ` Ido Schimmel
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=ZBC+gUXyTsHHIX8O@shredder \
--to=idosch@nvidia.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=mlxsw@nvidia.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=vadimp@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.