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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Mar 2016 15:23:42 +0100
From:	Sebastian Reichel <sre@...nel.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/14] power: pm2301-charger: use __maybe_unused to hide
 pm functions

Hi,

On Wed, Mar 02, 2016 at 04:58:56PM +0100, Arnd Bergmann wrote:
> The pm2301 charger driver uses nested #ifdefs to check for both
> CONFIG_PM and CONFIG_PM_SLEEP in an attempt to hide its
> suspend and runtime-pm operations when they are unused, but
> it does not hide the clear_lpn_pin() function in the same
> way, so we get a build warning when everything is
> disabled:
> 
> drivers/power/pm2301_charger.c:123:13: error: 'clear_lpn_pin' defined but not used [-Werror=unused-function]
> 
> This removes all the #ifdef and instead uses __maybe_unused
> annotations to let the compiler know it can silently drop
> the function definition.
> 
> For the PM2XXX_PM_OPS, we can use an IS_ENABLED() check
> to avoid defining the structure when CONFIG_PM is not set without
> the #ifdef.

Thanks, queued.

-- Sebastian

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