From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933537AbbIDTMN (ORCPT ); Fri, 4 Sep 2015 15:12:13 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:34678 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758222AbbIDTMM (ORCPT ); Fri, 4 Sep 2015 15:12:12 -0400 From: David Daney To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Frank Rowand , Grant Likely Cc: David Daney Subject: [PATCH] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages. Date: Fri, 4 Sep 2015 12:12:06 -0700 Message-Id: <1441393926-23225-1-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Daney 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 --- 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