lkml.org 
[lkml]   [2019]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] thermal: Add some error messages
From
Date
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...


\
 
 \ /
  Last update: 2019-07-11 02:15    [W:3.173 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site