lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231218-topic-thermaldbg-v1-1-451bcb723e1d@linaro.org>
Date: Mon, 18 Dec 2023 15:40:00 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>, 
 Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>, 
 Lukasz Luba <lukasz.luba@....com>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>, 
 linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, 
 Konrad Dybcio <konrad.dybcio@...aro.org>
Subject: [PATCH] thermal: core: Print out thermal zone name on
 update_temperature error

Currently, we can encounter an error like this:

  thermal thermal_zone48: failed to read out thermal zone (-19)

It's good to know that there's been an issue, but on some occasions
(like the error happening in the middle of a platform crash), one may
not be able to look up what kind of thermal zone that is.

Add the TZ name to the error message in order to speed up debugging.

Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
---
 drivers/thermal/thermal_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 2415dc50c31d..a6ccf93eb34e 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -403,8 +403,8 @@ static void update_temperature(struct thermal_zone_device *tz)
 	if (ret) {
 		if (ret != -EAGAIN)
 			dev_warn(&tz->device,
-				 "failed to read out thermal zone (%d)\n",
-				 ret);
+				 "failed to read out thermal zone %s (%d)\n",
+				 tz->type, ret);
 		return;
 	}
 

---
base-commit: ceb2fe0d438644e1de06b9a6468a1fb8e2199c70
change-id: 20231218-topic-thermaldbg-a59300435456

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@...aro.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ