Devicetree
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: frowand.list@gmail.com
Cc: David Daney <ddaney.cavm@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Grant Likely <grant.likely@linaro.org>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.
Date: Wed, 9 Sep 2015 10:53:04 -0700	[thread overview]
Message-ID: <55F07200.9060209@caviumnetworks.com> (raw)
In-Reply-To: <55F06FE3.9020600@gmail.com>

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;

      reply	other threads:[~2015-09-09 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-08 18:28 [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages David Daney
2015-09-09 17:37 ` Frank Rowand
2015-09-09 17:44 ` Frank Rowand
2015-09-09 17:53   ` David Daney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F07200.9060209@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox