Re: [PATCH] of: irq: don't return 0 from of_irq_get()
From: Sergei Shtylyov <hidden>
Date: 2016-06-10 12:14:44
Also in:
lkml
From: Sergei Shtylyov <hidden>
Date: 2016-06-10 12:14:44
Also in:
lkml
On 6/3/2016 3:14 PM, Rob Herring wrote:
quoted
of_irq_get() returns 0 iff irq_create_of_mapping() call fails. Returning both error code and 0 on failure is a sign of a misdesigned API. Return -ENXIO instead like one of the callers, platform_get_irq(), does; fix up the kernel-doc as well... Signed-off-by: Sergei Shtylyov <redacted>So I think this is done this way because of the variation in NO_IRQ definition across architectures.
I remember that NO_IRQ is "considered harmful" by Linus. Actually, I'm nit
sure what you mean, could you elaborate on that?
But then again, of_irq_get is relatively new.
Rob
MBR, Sergei