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:	Mon, 4 Jan 2016 08:49:30 +0100
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	Alexandre Courbot <gnurou@...il.com>
Subject: Re: [PATCH] gpiolib: always initialize *flags from of_get_named_gpio_flags

On Fri, Jan 1, 2016 at 11:40 PM, Arnd Bergmann <arnd@...db.de> wrote:

> The of_get_named_gpio_flags() function does nothing other than returning
> an error when CONFIG_OF_GPIO is disabled, but that causes spurious
> warnings about possible use of uninitialized variables in any code that
> does not check the of_get_named_gpio_flags() return value before trying
> to use the flags:
>
> drivers/input/misc/rotary_encoder.c: In function 'rotary_encoder_probe':
> drivers/input/misc/rotary_encoder.c:223:28: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> drivers/power/bq24735-charger.c: In function 'bq24735_charger_probe':
> drivers/power/bq24735-charger.c:227:12: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> drivers/power/sbs-battery.c: In function 'sbs_probe':
> drivers/power/sbs-battery.c:782:17: warning: 'gpio_flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> This changes the behavior of the inline helper to set the flags to zero
> when OF_GPIO is disabled, to avoid the warnings. In all cases I've
> encountered, we don't actually get to the place that uses the flags
> if CONFIG_OF is disabled because we won't enter the DT parser code.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Patch applied!

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ