[lkml]   [2020]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/5] pci: handled return value of platform_get_irq correctly
On Thu, Mar 12, 2020 at 8:02 PM Bjorn Helgaas <> wrote:

> IIUC, in the link you mentioned, Linus T says that "dev->irq == 0"
> means we don't have a valid IRQ. I think that makes sense, but I'm
> not sure it follows that 0 must be a sensical return value for
> platform_get_irq(). It seems to me that platform_get_irq() ought to
> return either a valid IRQ or an error, and the convention for errors
> is a negative errno.

OK I see your point.

I would be fine of the code is changed from:

if (irq <= 0)


if (irq < 0)
error retrieving IRQ

if (!irq)
error driver requires a valid IRQ

To the driver (this one in specific) the IRQ is expected and
necessary and I think it holds for most PCI hosts.

Linus Walleij

 \ /
  Last update: 2020-03-12 23:45    [W:0.039 / U:5.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site