Re: [PATCH v6 31/57] pci: Remove dev_err() usage after platform_get_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux