Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1221598

Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.

From David Daney <ddaney@caviumnetworks.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.
Date 2015-09-09 20:00 +0200
Message-ID <q6RP4-1O3-7@gated-at.bofh.it> (permalink)
References <q6vOy-3Pp-7@gated-at.bofh.it> <q6RFn-1CQ-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/09/2015 10:44 AM, Frank Rowand wrote:
> Second attempt at this reply.  The first reply was mangled.
>
> On 9/8/2015 11:28 AM, David Daney wrote:
>> 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 moving the printing code into of_irq_parse_pci(), and only
>> emitting the message for cases where PCI_INTERRUPT_PIN == 0 is not the
>> cause for an early exit.
>>
>> Signed-off-by: David Daney <david.daney@cavium.com>
>> ---
>> Changes in v2: Move the print function in to of_irq_parse_pci() at a
>> common error exit point (as suggested by Frank Rowand).
>>
>>
[...]
>> @@ -87,6 +89,9 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
>>   	laddr[0] = cpu_to_be32((pdev->bus->number << 16) | (pdev->devfn << 8));
>>   	laddr[1] = laddr[2] = cpu_to_be32(0);
>
>>   	return of_irq_parse_raw(laddr, out_irq);
>
> should be:
>
>          rc = of_irq_parse_raw(laddr, out_irq);
>          if (rc)
>                  goto err;
>          return 0;
>

You are right.  I will send v3.

Thanks,
David Daney

>> +err:
>> +	dev_err(&pdev->dev, "of_irq_parse_pci() failed with rc=%d\n", rc);
>> +	return rc;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages. David Daney <ddaney.cavm@gmail.com> - 2015-09-08 20:30 +0200
  Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed  ..." messages. Frank Rowand <frowand.list@gmail.com> - 2015-09-09 19:40 +0200
  Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed  ..." messages. Frank Rowand <frowand.list@gmail.com> - 2015-09-09 19:50 +0200
    Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed  ..." messages. David Daney <ddaney@caviumnetworks.com> - 2015-09-09 20:00 +0200

csiph-web