From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux PM <linux-pm@vger.kernel.org>
Cc: 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>,
Lukasz Luba <lukasz.luba@arm.com>
Subject: [PATCH v3 1/2] thermal: trip: Drop a redundant check from thermal_zone_set_trip()
Date: Wed, 29 Nov 2023 14:36:07 +0100 [thread overview]
Message-ID: <4897451.31r3eYUQgx@kreacher> (raw)
In-Reply-To: <12350772.O9o76ZdvQC@kreacher>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
After recent changes in the thermal framework, a trip points array is
required for registering a thermal zone that is not tripless, so the
tz->trips pointer in thermal_zone_set_trip() is never NULL and the
check involving it is redundant. Drop that check.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
---
v2 -> v3: Add the tag from Lukasz
v1 -> v2: New patch
---
drivers/thermal/thermal_trip.c | 3 ---
1 file changed, 3 deletions(-)
Index: linux-pm/drivers/thermal/thermal_trip.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_trip.c
+++ linux-pm/drivers/thermal/thermal_trip.c
@@ -153,9 +153,6 @@ int thermal_zone_set_trip(struct thermal
struct thermal_trip t;
int ret;
- if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz->trips)
- return -EINVAL;
-
ret = __thermal_zone_get_trip(tz, trip_id, &t);
if (ret)
return ret;
next prev parent reply other threads:[~2023-11-29 13:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 13:33 [PATCH v3 0/2] thermal: trip: Rework thermal_zone_set_trip() and its callers Rafael J. Wysocki
2023-11-29 13:36 ` Rafael J. Wysocki [this message]
2023-11-29 15:26 ` [PATCH v3 1/2] thermal: trip: Drop a redundant check from thermal_zone_set_trip() Daniel Lezcano
2023-11-30 13:39 ` Rafael J. Wysocki
2023-11-29 13:38 ` [PATCH v3 2/2] thermal: trip: Rework thermal_zone_set_trip() and its callers Rafael J. Wysocki
2023-11-29 16:53 ` Daniel Lezcano
2023-11-29 17:14 ` Rafael J. Wysocki
2023-11-29 21:43 ` Lukasz Luba
2023-11-30 10:39 ` Daniel Lezcano
2023-11-30 11:31 ` 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=4897451.31r3eYUQgx@kreacher \
--to=rjw@rjwysocki.net \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--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