Skip to contentSkip to conversation

usb: xhci: Fix build warning seen with CONFIG_PM=n

PATCH In review Guenter Roeck 3 participants 4 messages Dec 18, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: xhci: Fix build warning seen with CONFIG_PM=n

The following build warning is seen if CONFIG_PM is disabled.

drivers/usb/host/xhci-pci.c:498:13: warning:
unused function 'xhci_pci_shutdown'

Fixes f2c710f7dca8 ("usb: xhci: only set D3hot for pci device")
Cc Henry Lin <[email protected]>
Cc [email protected] # all stable releases with 2f23dc86c3f8
---
 drivers/usb/host/xhci-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-pci.c +1 -1
index 2907fe4d78dd..4917c5b033fa 100644
@@ -519,7 +519,6 @@ static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
 	retval = xhci_resume(xhci, hibernated);
 	return retval;
 }
-#endif /* CONFIG_PM */
 
 static void xhci_pci_shutdown(struct usb_hcd *hcd)
 {
@@ -532,6 +531,7 @@ static void xhci_pci_shutdown(struct usb_hcd *hcd)
 	if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
 		pci_set_power_state(pdev, PCI_D3hot);
 }
+#endif /* CONFIG_PM */
 
 /*-------------------------------------------------------------------------*/
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Guenter Roeck

The following build warning is seen if CONFIG_PM is disabled.

drivers/usb/host/xhci-pci.c:498:13: warning:
unused function 'xhci_pci_shutdown'

Quoted 7 lines
Fixes f2c710f7dca8 ("usb: xhci: only set D3hot for pci device")
Cc Henry Lin <[email protected]>
Cc [email protected] # all stable releases with 2f23dc86c3f8
---
 drivers/usb/host/xhci-pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nice catch.

Mathias, I can queue this up now if you give me an ack.

thanks,

greg k-h

Acked-by
#2 lore raw
Quoted 14 lines · Greg Kroah-Hartman
Quoted 5 lines · Guenter Roeck

The following build warning is seen if CONFIG_PM is disabled.

drivers/usb/host/xhci-pci.c:498:13: warning:
unused function 'xhci_pci_shutdown'

Quoted 7 lines
Fixes f2c710f7dca8 ("usb: xhci: only set D3hot for pci device")
Cc Henry Lin <[email protected]>
Cc [email protected] # all stable releases with 2f23dc86c3f8
---
  drivers/usb/host/xhci-pci.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines

Nice catch.

Mathias, I can queue this up now if you give me an ack.

Yes, please

#3 lore raw
Quoted 10 lines · Mathias Nyman
Quoted 9 lines · Greg Kroah-Hartman
Quoted 8 lines · Guenter Roeck

The following build warning is seen if CONFIG_PM is disabled.

drivers/usb/host/xhci-pci.c:498:13: warning:
unused function 'xhci_pci_shutdown'

Fixes f2c710f7dca8 ("usb: xhci: only set D3hot for pci device")
Cc Henry Lin <[email protected]>
Cc [email protected] # all stable releases with 2f23dc86c3f8

Somehow I messed up the commit sha here. It is f2c710f7dca8, obviously. 2f23dc86c3f8 is the sha from v4.19.y. Sorry for that.

Guenter

Quoted 13 lines
Quoted 8 lines
Quoted 4 lines
---
  drivers/usb/host/xhci-pci.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Nice catch.

Mathias, I can queue this up now if you give me an ack.

Yes, please