Commit d5c82feb authored by Olof Johansson's avatar Olof Johansson Committed by Sarah Sharp

usb: xhci: Mark two functions __maybe_unused

Resolves the following build warnings:
drivers/usb/host/xhci.c:332:13: warning: 'xhci_msix_sync_irqs' defined but not used [-Wunused-function]
drivers/usb/host/xhci.c:3901:12: warning: 'xhci_change_max_exit_latency' defined but not used [-Wunused-function]

These functions are not always used, and since they're marked static
they will produce build warnings:
- xhci_msix_sync_irqs is only used with CONFIG_PCI.
- xhci_change_max_exit_latency is a little more complicated with
  dependencies on CONFIG_PM and CONFIG_PM_RUNTIME.

Instead of building a bigger maze of ifdefs in this code, I've just
marked both with __maybe_unused.
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent 203a8661
...@@ -329,7 +329,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci) ...@@ -329,7 +329,7 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
return; return;
} }
static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) static void __maybe_unused xhci_msix_sync_irqs(struct xhci_hcd *xhci)
{ {
int i; int i;
...@@ -3898,7 +3898,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1) ...@@ -3898,7 +3898,7 @@ int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1)
* Issue an Evaluate Context command to change the Maximum Exit Latency in the * Issue an Evaluate Context command to change the Maximum Exit Latency in the
* slot context. If that succeeds, store the new MEL in the xhci_virt_device. * slot context. If that succeeds, store the new MEL in the xhci_virt_device.
*/ */
static int xhci_change_max_exit_latency(struct xhci_hcd *xhci, static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
struct usb_device *udev, u16 max_exit_latency) struct usb_device *udev, u16 max_exit_latency)
{ {
struct xhci_virt_device *virt_dev; struct xhci_virt_device *virt_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment