linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the usb tree
@ 2023-03-27  5:02 Stephen Rothwell
  2023-03-27  7:37 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2023-03-27  5:02 UTC (permalink / raw)
  To: Greg KH
  Cc: Greg Kroah-Hartman, Josue David Hernandez Gutierrez,
	Mathias Nyman, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]

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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: build failure after merge of the usb tree
  2023-03-27  5:02 linux-next: build failure after merge of the usb tree Stephen Rothwell
@ 2023-03-27  7:37 ` Greg KH
  2023-03-27 10:31   ` [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set Mathias Nyman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2023-03-27  7:37 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Josue David Hernandez Gutierrez, Mathias Nyman,
	Linux Kernel Mailing List, Linux Next Mailing List

On Mon, Mar 27, 2023 at 04:02:32PM +1100, Stephen Rothwell wrote:
> 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.

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

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set
  2023-03-27  7:37 ` Greg KH
@ 2023-03-27 10:31   ` Mathias Nyman
  2023-03-27 12:02     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Nyman @ 2023-03-27 10:31 UTC (permalink / raw)
  To: greg, sfr
  Cc: josue.d.hernandez.gutierrez, linux-kernel, linux-next, 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")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index a53ecc8ff8c5..1e826a159b96 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set
  2023-03-27 10:31   ` [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set Mathias Nyman
@ 2023-03-27 12:02     ` Greg KH
  2023-03-27 13:39       ` Mathias Nyman
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2023-03-27 12:02 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: sfr, josue.d.hernandez.gutierrez, linux-kernel, linux-next

On Mon, Mar 27, 2023 at 01:31:03PM +0300, Mathias Nyman wrote:
> 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")
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> ---
>  drivers/usb/host/xhci-pci.c | 27 ++++++++++++++-------------
>  1 file changed, 14 insertions(+), 13 deletions(-)

No linux-usb?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set
  2023-03-27 12:02     ` Greg KH
@ 2023-03-27 13:39       ` Mathias Nyman
  0 siblings, 0 replies; 5+ messages in thread
From: Mathias Nyman @ 2023-03-27 13:39 UTC (permalink / raw)
  To: Greg KH; +Cc: sfr, josue.d.hernandez.gutierrez, linux-kernel, linux-next

On 27.3.2023 15.02, Greg KH wrote:
> On Mon, Mar 27, 2023 at 01:31:03PM +0300, Mathias Nyman wrote:
>> 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")
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>> ---
>>   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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-27 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27  5:02 linux-next: build failure after merge of the usb tree Stephen Rothwell
2023-03-27  7:37 ` Greg KH
2023-03-27 10:31   ` [PATCH] xhci: only define xhci_msix_sync_irqs() when CONFIG_PM is set Mathias Nyman
2023-03-27 12:02     ` Greg KH
2023-03-27 13:39       ` Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).