Skip to contentSkip to conversation

linux-next: build failure after merge of the usb tree

PATCH In review Stephen Rothwell 4 participants 5 messages Mar 27, 2023

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

Hi all,

After merging the usb tree, today's linux-next build (s390 allmodconfig) failed like this:

drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function]

(reported here: http://kisskb.ellerman.id.au/kisskb/buildresult/14902506/)

Caused by commit

9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")

The function is only called if CONFIG_PM is set, but defined unconditionally.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the usb tree, today's linux-next build (s390 allmodconfig) failed like this:

drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function]

Quoted 8 lines

(reported here: http://kisskb.ellerman.id.au/kisskb/buildresult/14902506/)

Caused by commit

9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")

The function is only called if CONFIG_PM is set, but defined unconditionally.

Ick. Mathias, can you make up a patch for this?

thanks,

greg k-h

#2 lore raw

PATCH 1/1 xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set

xhci_msic_sync_irqs() function is only called during suspend, when CONFIG_PM is set, so don't define it unconditionally.

Fixes 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
---
 drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)
drivers/usb/host/xhci-pci.c +14 -13
index a53ecc8ff8c5..1e826a159b96 100644
@@ -88,19 +88,6 @@ static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
 	.update_hub_device = xhci_pci_update_hub_device,
 };
 
-static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
-{
-	struct usb_hcd *hcd = xhci_to_hcd(xhci);
-
-	if (hcd->msix_enabled) {
-		struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
-		int i;
-
-		for (i = 0; i < xhci->msix_count; i++)
-			synchronize_irq(pci_irq_vector(pdev, i));
-	}
-}
-
 /* Free any IRQs and disable MSI-X */
 static void xhci_cleanup_msix(struct xhci_hcd *xhci)
 {
@@ -729,6 +716,20 @@ static void xhci_pci_remove(struct pci_dev *dev)
 }
 
 #ifdef CONFIG_PM
+
+static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
+{
+	struct usb_hcd *hcd = xhci_to_hcd(xhci);
+
+	if (hcd->msix_enabled) {
+		struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+		int i;
+
+		for (i = 0; i < xhci->msix_count; i++)
+			synchronize_irq(pci_irq_vector(pdev, i));
+	}
+}
+
 /*
  * In some Intel xHCI controllers, in order to get D3 working,
  * through a vendor specific SSIC CONFIG register at offset 0x883c,
Signature · 1 line
2.25.1
maintainer
#3 lore raw

Re: [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set

Quoted 8 lines · Mathias Nyman

xhci_msic_sync_irqs() function is only called during suspend, when CONFIG_PM is set, so don't define it unconditionally.

Fixes 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
---
 drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

No linux-usb?

#4 lore raw

Re: [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set

Quoted 4 lines · Greg KH
Quoted 3 lines · Mathias Nyman

xhci_msic_sync_irqs() function is only called during suspend, when CONFIG_PM is set, so don't define it unconditionally.

Quoted 8 lines
Quoted 5 lines
Fixes 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
---
  drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
  1 file changed, 14 insertions(+), 13 deletions(-)

No linux-usb?

Oh, right, linux-usb was missing.
Now sent there separately as well

Thanks
Mathias