lkml.org 
[lkml]   [2019]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()
From
Date
On 30/07/2019 23:56, Bjorn Helgaas wrote:

>> diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c
>> index 21a208da3f59..b87aa9041480 100644
>> --- a/drivers/pci/controller/pcie-tango.c
>> +++ b/drivers/pci/controller/pcie-tango.c
>> @@ -273,10 +273,8 @@ static int tango_pcie_probe(struct platform_device *pdev)
>> writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset);
>>
>> virq = platform_get_irq(pdev, 1);
>> - if (virq <= 0) {
>> - dev_err(dev, "Failed to map IRQ\n");
>> + if (virq <= 0)
>> return -ENXIO;
>
> Why <= 0 and -ENXIO?

Smirk. I remember discussing this in the past...
Here it is:

https://patchwork.kernel.org/patch/10006651/

A) AFAIU platform_get_irq() = 0 signals an error.

https://yarchive.net/comp/linux/zero.html
https://lkml.org/lkml/2016/2/9/212
https://patchwork.ozlabs.org/patch/486056/

B) I don't remember why I picked ENXIO.
Perhaps it made more sense to me (at the time) than EINVAL or ENODEV.

Regards.

\
 
 \ /
  Last update: 2019-08-07 16:10    [W:0.112 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site