From: Heiner Kallweit <hkallweit1@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Amit Kucheria <amitk@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>
Subject: [PATCH] thermal: core: don't warn in case of ENODATA
Date: Mon, 23 Nov 2020 16:03:54 +0100 [thread overview]
Message-ID: <160717f1-4bf1-842a-8c11-9c4d03962d0b@gmail.com> (raw)
Some devices provide temperature data only in a specific state,
e.g. iwlwifi requires that network device is up (firmware running).
If a device knowingly provides no data, then there's no point in
alerting the user. However the info about the missing data might be
useful in some cases, therefore add a debug message.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/thermal/thermal_core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 90e38cc19..19bb6c99c 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -454,7 +454,9 @@ static void update_temperature(struct thermal_zone_device *tz)
ret = thermal_zone_get_temp(tz, &temp);
if (ret) {
- if (ret != -EAGAIN)
+ if (ret == -ENODATA)
+ dev_dbg(&tz->device, "no temperature data available\n");
+ else if (ret != -EAGAIN)
dev_warn(&tz->device,
"failed to read out thermal zone (%d)\n",
ret);
--
2.29.2
reply other threads:[~2020-11-23 15:04 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=160717f1-4bf1-842a-8c11-9c4d03962d0b@gmail.com \
--to=hkallweit1@gmail.com \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).