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]
Message-ID: <87polvu177.fsf@linux.intel.com>
Date:   Wed, 16 Nov 2016 13:13:48 +0200
From:   Felipe Balbi <balbi@...nel.org>
To:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dwc3: make PM functions as __maybe_unused


Hi,

Arnd Bergmann <arnd@...db.de> writes:
> A change to the suspend/resume handling in dwc3-pci introduced a
> harmless warning:
>
> drivers/usb/dwc3/dwc3-pci.c:169:12: error: ‘dwc3_pci_dsm’ defined but not used [-Werror=unused-function]
>
> Replacing the #ifdef around the PM functions with __maybe_unused
> annotations is the easiest way to make sure this doesn't happen
> again. A similar problem happened two months earlier and we
> ended up updating the #ifdef, but as it has come back now,
> I'd suggest going back to my earlier approach.
>
> Fixes: 9cecca75b5a0 ("usb: dwc3: pci: call _DSM for suspend/resume")
> Link: https://patchwork.kernel.org/patch/9318887/
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

I'll just move the ifdef around. We really need a real fix for this. Why
couldn't we just always add PM callbacks and assume they won't be used
if !PM && !PM_SLEEP?

Adding __maybe_unused everywhere is rather unelegant :-(

-- 
balbi

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ