Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM

When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
warning:
drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
but not used [-Wunused-function]

Instead of creating nested #ifdefs, this patch fixes it by defining the
xHCI PCI stubs as inline.

This warning has been in since 3.2 kernel and was
caused by commit 421aa841a134f6a743111cf44d0c6d3b45e3cf8c
"usb/xhci: hide MSI code behind PCI bars", but wasn't noticed
until 3.13 when a configuration with these options was tried

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Cc: stable@vger.kernel.org # 3.2
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

David Cohen and committed by
Greg Kroah-Hartman
01bb59eb 6db249eb

+3 -3
+3 -3
drivers/usb/host/xhci.c
··· 408 408 409 409 #else 410 410 411 - static int xhci_try_enable_msi(struct usb_hcd *hcd) 411 + static inline int xhci_try_enable_msi(struct usb_hcd *hcd) 412 412 { 413 413 return 0; 414 414 } 415 415 416 - static void xhci_cleanup_msix(struct xhci_hcd *xhci) 416 + static inline void xhci_cleanup_msix(struct xhci_hcd *xhci) 417 417 { 418 418 } 419 419 420 - static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) 420 + static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci) 421 421 { 422 422 } 423 423