Thread (3 messages) flat view 3 messages, 3 authors, 2016-11-10

Re: [PATCH] of/irq: improve error message on irq discovery process failure

From: Benjamin Herrenschmidt <hidden>
Date: 2016-11-10 21:28:32
Also in: linux-devicetree, linux-pci

On Wed, 2016-11-09 at 12:05 -0200, Guilherme G. Piccoli wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 393fea8..1ad6882 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -275,7 +275,10 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
        of_node_put(ipar);
        of_node_put(newpar);
 
-       return -EINVAL;
+       /* Positive non-zero return means no Level-triggered Interrupts
+        * capability was found.
+        */
+       return ENOENT;
 }
 EXPORT_SYMBOL_GPL(of_irq_parse_raw);
I'm not fan. I'd rather it's -ENOENT and the callers can check for that
specific code rather than playing with the sign.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help