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-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ