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:   Thu, 30 Mar 2023 14:11:44 +0300
From:   Mathias Nyman <mathias.nyman@...ux.intel.com>
To:     Arnd Bergmann <arnd@...nel.org>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Josue David Hernandez Gutierrez 
        <josue.d.hernandez.gutierrez@...el.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Alan Stern <stern@...land.harvard.edu>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xhci: use pm_ptr() instead of #ifdef for CONFIG_PM
 conditionals

On 28.3.2023 16.10, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> A recent patch caused an unused-function warning in builds with
> CONFIG_PM disabled, after the function became marked 'static':
> 
> drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function]
>     91 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
>        |             ^~~~~~~~~~~~~~~~~~~
> 
> This could be solved by adding another #ifdef, but as there is
> a trend towards removing CONFIG_PM checks in favor of helper
> macros, do the same conversion here and use pm_ptr() to get
> either a function pointer or NULL but avoid the warning.
> 
> As the hidden functions reference some other symbols, make
> sure those are visible at compile time, at the minimal cost of
> a few extra bytes for 'struct usb_device'.
> 
> Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks for this.
Looks like Greg already picked it.

-Mathias

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ