Skip to contentSkip to conversation

thermal: trivial fixes to error messages

PATCH In review Amit Kucheria 3 participants 5 messages Jan 21, 2019 – Feb 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover thermal: trivial fixes to error messages

Fix up a couple of error messages

Amit Kucheria (2):
thermal: of-thermal: Print name of device node with error
thermal: cpu_cooling: Clarify error message

 drivers/thermal/cpu_cooling.c | 2 +-
 drivers/thermal/of-thermal.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 thermal: of-thermal: Print name of device node with error

Make it easier to debug devicetree definition in case of errors.

---
 drivers/thermal/of-thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/of-thermal.c +2 -2
index 4bfdb4a1e47d..2df059cc07e2 100644
@@ -867,14 +867,14 @@ __init *thermal_of_build_thermal_zone(struct device_node *np)
 
 	ret = of_property_read_u32(np, "polling-delay-passive", &prop);
 	if (ret < 0) {
-		pr_err("missing polling-delay-passive property\n");
+		pr_err("%pOFn: missing polling-delay-passive property\n", np);
 		goto free_tz;
 	}
 	tz->passive_delay = prop;
 
 	ret = of_property_read_u32(np, "polling-delay", &prop);
 	if (ret < 0) {
-		pr_err("missing polling-delay property\n");
+		pr_err("%pOFn: missing polling-delay property\n", np);
 		goto free_tz;
 	}
 	tz->polling_delay = prop;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 thermal: cpu_cooling: Clarify error message

In reply to Amit Kucheria

Make it clear that it is a failure if the cpufreq driver was unable to register as a cooling device. Makes it easier to find in logs and grepping for words like fail, err, warn.

---
 drivers/thermal/cpu_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/cpu_cooling.c +1 -1
index dfd23245f778..6fff16113628 100644
@@ -774,7 +774,7 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
 
 		cdev = __cpufreq_cooling_register(np, policy, capacitance);
 		if (IS_ERR(cdev)) {
-			pr_err("cpu_cooling: cpu%d is not running as cooling device: %ld\n",
+			pr_err("cpu_cooling: cpu%d failed to register as cooling device: %ld\n",
 			       policy->cpu, PTR_ERR(cdev));
 			cdev = NULL;
 		}
Signature · 1 line
2.17.1
#4 lore raw
In reply to Amit Kucheria
Quoted 9 lines · Amit Kucheria

Fix up a couple of error messages

Amit Kucheria (2):
thermal: of-thermal: Print name of device node with error
thermal: cpu_cooling: Clarify error message

 drivers/thermal/cpu_cooling.c | 2 +-
 drivers/thermal/of-thermal.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Collecting these.

Quoted 3 lines
Signature · 2 lines
-- 
2.17.1