[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fece42c0-f511-173a-b16a-5b1f3a1c1a4e@free.fr>
Date: Wed, 7 Aug 2019 16:09:10 +0200
From: Marc Gonzalez <marc.w.gonzalez@...e.fr>
To: Bjorn Helgaas <helgaas@...nel.org>,
Stephen Boyd <swboyd@...omium.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
PCI <linux-pci@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Lucas Stach <l.stach@...gutronix.de>,
Linus Walleij <linus.walleij@...aro.org>,
Mans Rullgard <mans@...sr.com>, Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v6 31/57] pci: Remove dev_err() usage after
platform_get_irq()
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.
Powered by blists - more mailing lists