From: "thermal-bot for Daniel Lezcano" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/core: Fix lockdep_assert() warning
Date: Tue, 23 Aug 2022 12:42:38 -0000 [thread overview]
Message-ID: <166125855850.401.12486120367006542290.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 2f9d142c93c293b2526d63e4e75716945edf0cd2
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//2f9d142c93c293b2526d63e4e75716945edf0cd2
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate: Fri, 12 Aug 2022 15:07:43 +02:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 17 Aug 2022 14:09:39 +02:00
thermal/core: Fix lockdep_assert() warning
The function thermal_zone_device_is_enabled() must be called with the
thermal zone lock held. In the resume path, it is called without.
As the thermal_zone_device_is_enabled() is also checked in
thermal_zone_device_update(), do the check in resume() function is
pointless, except for saving an extra initialization which does not
hurt if it is done in all the cases.
Fixes: ca48ad71717dd ("thermal/core: Move the mutex inside the thermal_zone_device_update() function")
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/thermal/thermal_core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 4812170..99c0c19 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1438,9 +1438,6 @@ static int thermal_pm_notify(struct notifier_block *nb,
case PM_POST_SUSPEND:
atomic_set(&in_suspend, 0);
list_for_each_entry(tz, &thermal_tz_list, node) {
- if (!thermal_zone_device_is_enabled(tz))
- continue;
-
thermal_zone_device_init(tz);
thermal_zone_device_update(tz,
THERMAL_EVENT_UNSPECIFIED);
reply other threads:[~2022-08-23 16:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=166125855850.401.12486120367006542290.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=rui.zhang@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