From: Lukasz Luba <lukasz.luba@arm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH v2 1/2] thermal: trip: Drop a redundant check from thermal_zone_set_trip()
Date: Tue, 28 Nov 2023 21:44:04 +0000 [thread overview]
Message-ID: <23b21239-4268-43e2-acc3-4ebc454944e7@arm.com> (raw)
In-Reply-To: <4544904.LvFx2qVVIh@kreacher>
On 11/28/23 13:56, Rafael J. Wysocki wrote:
> 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>
> ---
>
> New patch in v2.
>
> ---
> 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;
>
>
>
LGTM
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
next prev parent reply other threads:[~2023-11-28 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 13:54 [PATCH v2 0/2] thermal: trip: Rework thermal_zone_set_trip() and its callers Rafael J. Wysocki
2023-11-28 13:56 ` [PATCH v2 1/2] thermal: trip: Drop a redundant check from thermal_zone_set_trip() Rafael J. Wysocki
2023-11-28 21:44 ` Lukasz Luba [this message]
2023-11-28 13:58 ` [PATCH v2 2/2] thermal: trip: Rework thermal_zone_set_trip() and its callers Rafael J. Wysocki
2023-11-28 21:43 ` Lukasz Luba
2023-11-29 12:16 ` 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=23b21239-4268-43e2-acc3-4ebc454944e7@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 \
--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
all inboxes | Powered by JetHome®