linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: irq: Fix the return value for of_irq_parse_one() stub
@ 2021-02-10 20:00 Saravana Kannan
  2021-02-10 21:09 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Saravana Kannan @ 2021-02-10 20:00 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, Greg Kroah-Hartman, Stephen Rothwell
  Cc: Saravana Kannan, kernel-team, devicetree, linux-kernel

When commit 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")
added a stub for of_irq_parse_one() it set the return value to 0. Return
value of 0 in this instance means the call succeeded and the out_irq
pointer was filled with valid data. So, fix it to return an error value.

Fixes: 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")
Signed-off-by: Saravana Kannan <saravanak@google.com>
---

This needs to go into driver-core.

-Saravana

 include/linux/of_irq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index f898d838d201..aaf219bd0354 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -60,7 +60,7 @@ u32 of_msi_map_id(struct device *dev, struct device_node *msi_np, u32 id_in);
 static inline int of_irq_parse_one(struct device_node *device, int index,
 				   struct of_phandle_args *out_irq)
 {
-	return 0;
+	return -EINVAL;
 }
 static inline int of_irq_count(struct device_node *dev)
 {
-- 
2.30.0.478.g8a0d178c01-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: irq: Fix the return value for of_irq_parse_one() stub
  2021-02-10 20:00 [PATCH] of: irq: Fix the return value for of_irq_parse_one() stub Saravana Kannan
@ 2021-02-10 21:09 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2021-02-10 21:09 UTC (permalink / raw)
  To: Saravana Kannan
  Cc: Rob Herring, Frank Rowand, Greg Kroah-Hartman, kernel-team,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

Hi Saravana,

On Wed, 10 Feb 2021 12:00:49 -0800 Saravana Kannan <saravanak@google.com> wrote:
>
> When commit 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")
> added a stub for of_irq_parse_one() it set the return value to 0. Return
> value of 0 in this instance means the call succeeded and the out_irq
> pointer was filled with valid data. So, fix it to return an error value.
> 
> Fixes: 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")
> Signed-off-by: Saravana Kannan <saravanak@google.com>

Oops, sorry about that.

Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-10 21:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 20:00 [PATCH] of: irq: Fix the return value for of_irq_parse_one() stub Saravana Kannan
2021-02-10 21:09 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).