[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cd61708e47cd63f3efaaa3e079982f63bfc88933.camel@perches.com>
Date: Wed, 10 Jul 2019 17:14:38 -0700
From: Joe Perches <joe@...ches.com>
To: Amit Kucheria <amit.kucheria@...aro.org>,
linux-kernel@...r.kernel.org, Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: linux-pm@...r.kernel.org
Subject: Re: [PATCH] thermal: Add some error messages
On Wed, 2019-07-10 at 17:16 +0530, Amit Kucheria wrote:
> When registering a thermal zone device, we currently return -EINVAL in
> four cases. This makes it a little hard to debug the real cause of the
> failure.
>
> Print some error messages to make it easier for developer to figure out
> what happened.
[]
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
[]
> @@ -1238,17 +1238,26 @@ thermal_zone_device_register(const char *type, int trips, int mask,
> int count;
> struct thermal_governor *governor;
>
> - if (!type || strlen(type) == 0)
> + if (!type || strlen(type) == 0) {
> + pr_err("Error: No thermal zone type defined");
Please use terminating newlines like:
pr_err("Error: No thermal zone type defined\n");
[]
> + pr_err("Error: Thermal zone name (%s) too long, should be under %d chars",
etc...
Powered by blists - more mailing lists