2019-01-21 09:44:30

by Amit Kucheria

[permalink] [raw]
Subject: [PATCH v1 0/2] 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(-)

--
2.17.1



2019-01-21 09:44:51

by Amit Kucheria

[permalink] [raw]
Subject: [PATCH v1 1/2] thermal: of-thermal: Print name of device node with error

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

Signed-off-by: Amit Kucheria <[email protected]>
---
drivers/thermal/of-thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 4bfdb4a1e47d..2df059cc07e2 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -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;
--
2.17.1


2019-01-21 09:45:16

by Amit Kucheria

[permalink] [raw]
Subject: [PATCH v1 2/2] thermal: cpu_cooling: Clarify error message

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.

Signed-off-by: Amit Kucheria <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
---
drivers/thermal/cpu_cooling.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index dfd23245f778..6fff16113628 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -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;
}
--
2.17.1


2019-01-22 07:10:27

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] thermal: trivial fixes to error messages

On 21-01-19, 15:12, Amit Kucheria wrote:
> 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

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-02-05 23:56:30

by Eduardo Valentin

[permalink] [raw]
Subject: Re: [PATCH v1 0/2] thermal: trivial fixes to error messages

On Mon, Jan 21, 2019 at 03:12:21PM +0530, Amit Kucheria wrote:
> 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.

>
> --
> 2.17.1