devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.
@ 2015-09-04 19:12 David Daney
       [not found] ` <1441393926-23225-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: David Daney @ 2015-09-04 19:12 UTC (permalink / raw)
  To: devicetree, linux-kernel, Rob Herring, Frank Rowand, Grant Likely
  Cc: David Daney

From: David Daney <david.daney@cavium.com>

It is perfectly legitimate for a PCI device to have an
PCI_INTERRUPT_PIN value of zero.  This happens if the device doesn't
use interrupts, or on PCIe devices, where only MSI/MSI-X are
supported.

Silence the annoying "of_irq_parse_pci() failed with rc=-19" error
messages by making them conditional on !-ENODEV (which can only be
produced in the PCI_INTERRUPT_PIN == 0 case).

Signed-off-by: David Daney <david.daney@cavium.com>
---
 drivers/of/of_pci_irq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c
index 1710d9d..33d242a 100644
--- a/drivers/of/of_pci_irq.c
+++ b/drivers/of/of_pci_irq.c
@@ -106,7 +106,9 @@ int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
 
 	ret = of_irq_parse_pci(dev, &oirq);
 	if (ret) {
-		dev_err(&dev->dev, "of_irq_parse_pci() failed with rc=%d\n", ret);
+		if (ret != -ENODEV)
+			dev_err(&dev->dev,
+				"of_irq_parse_pci() failed with rc=%d\n", ret);
 		return 0; /* Proper return code 0 == NO_IRQ */
 	}
 
-- 
1.7.11.7

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

end of thread, other threads:[~2015-09-07 23:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 19:12 [PATCH] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages David Daney
     [not found] ` <1441393926-23225-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-05  1:14   ` Frank Rowand
     [not found]     ` <55EA41E3.5010103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-05  1:40       ` David Daney
     [not found]         ` <55EA480C.6090306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-05  2:38           ` Frank Rowand
2015-09-06 20:46       ` Rob Herring
     [not found]         ` <CAL_JsqK0uW4F7HAcUMSQ-2wCvp_i3a5MTxsyW3XerHAxBrW=SQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07  2:16           ` Frank Rowand
2015-09-07  3:50             ` Frank Rowand
2015-09-07 23:44               ` Frank Rowand

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).