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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 13 Oct 2014 13:00:43 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Sebastian Reichel <sre@...nel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nicolas Ferre <nicolas.ferre@...el.com>
Subject: Re: [PATCH] power/reset: at91-poweroff: Fix error handling and other
 compiler warnings

On Fri, Oct 10, 2014 at 05:41:17PM -0700, Guenter Roeck wrote:
> at91_poweroff_get_wakeup_mode can return a negative error code and should
> therefore not return an enum type. Similar, its result should not be
> assigned to an enum type. Otherwise, the returned value is never negative,
> resulting in a compiler warning and a missed error condition, which in turn
> results in writing bad values into a chip register.
> 
> Also fix other compiler warnings which can be easily avoided.
> 
> drivers/power/reset/at91-poweroff.c:74:24:
> 	warning: type qualifiers ignored on function return type
> drivers/power/reset/at91-poweroff.c:74:24:
> 	warning: no previous prototype for 'at91_poweroff_get_wakeup_mode'
> drivers/power/reset/at91-poweroff.c:83:16:
> 	warning: comparison between signed and unsigned integer expressions
> drivers/power/reset/at91-poweroff.c:97:2:
> 	warning: comparison of unsigned expression < 0 is always false
> 
> Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
> Cc: Nicolas Ferre <nicolas.ferre@...el.com>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>

Acked-by: Maxime Ripard <maxime.ripard@...e-electrons.com>

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ