All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
@ 2017-07-29 19:52 Sergei Shtylyov
  2017-07-30  1:51 ` Scott Wood
  2017-08-03 10:19 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2017-07-29 19:52 UTC (permalink / raw)
  To: Scott Wood, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev
  Cc: Thomas Petazzoni, Sergei Shtylyov

of_irq_to_resource() has recently been  fixed to return negative error #'s
along with 0 in case of failure,  however the Freescale MPC832x RDB board
code still only regards 0 as as failure indication -- fix it up.

Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'master' branch of Scott Wood's 'linux.git' repo
(the 'fixes' branch is too much behind).

 arch/powerpc/platforms/83xx/mpc832x_rdb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/arch/powerpc/platforms/83xx/mpc832x_rdb.c
===================================================================
--- linux.orig/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ linux/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -89,7 +89,7 @@ static int __init of_fsl_spi_probe(char
 			goto err;
 
 		ret = of_irq_to_resource(np, 0, &res[1]);
-		if (!ret)
+		if (ret <= 0)
 			goto err;
 
 		pdev = platform_device_alloc("mpc83xx_spi", i);

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

* Re: [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
  2017-07-29 19:52 [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check Sergei Shtylyov
@ 2017-07-30  1:51 ` Scott Wood
  2017-07-31 10:04   ` Michael Ellerman
  2017-08-03 10:19 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Scott Wood @ 2017-07-30  1:51 UTC (permalink / raw)
  To: Sergei Shtylyov, Kumar Gala, Benjamin Herrenschmidt,
	Paul Mackerras, Michael Ellerman, linuxppc-dev
  Cc: Thomas Petazzoni

On Sat, 2017-07-29 at 22:52 +0300, Sergei Shtylyov wrote:
> of_irq_to_resource() has recently been  fixed to return negative error #'s
> along with 0 in case of failure,  however the Freescale MPC832x RDB board
> code still only regards 0 as as failure indication -- fix it up.
> 
> Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> The patch is against the 'master' branch of Scott Wood's 'linux.git' repo
> (the 'fixes' branch is too much behind).

The master branch is also old.  Those branches are only used when needed to
apply patches; I don't update them just to sync up.  If they're older than
what's in Michael's or Linus's tree (as they almost always are), then use
those instead.

Not that I expect it to make a difference to this patch...

-Scott

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

* Re: [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
  2017-07-30  1:51 ` Scott Wood
@ 2017-07-31 10:04   ` Michael Ellerman
  2017-08-02  4:04     ` Scott Wood
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2017-07-31 10:04 UTC (permalink / raw)
  To: Scott Wood, Sergei Shtylyov, Kumar Gala, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev
  Cc: Thomas Petazzoni

Scott Wood <oss@buserror.net> writes:

> On Sat, 2017-07-29 at 22:52 +0300, Sergei Shtylyov wrote:
>> of_irq_to_resource() has recently been=C2=A0=C2=A0fixed to return negati=
ve error #'s
>> along with 0 in case of failure,=C2=A0=C2=A0however the Freescale MPC832=
x RDB board
>> code still only regards 0 as as failure indication -- fix it up.
>>=20
>> Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>=20
>> ---
>> The patch is against the 'master' branch of Scott Wood's 'linux.git' repo
>> (the 'fixes' branch is too much behind).
>
> The master branch is also old.  Those branches are only used when needed =
to
> apply patches; I don't update them just to sync up.  If they're older than
> what's in Michael's or Linus's tree (as they almost always are), then use
> those instead.
>
> Not that I expect it to make a difference to this patch...

Do you want me to grab this as a fix for 4.13 ?

cheers

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

* Re: [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
  2017-07-31 10:04   ` Michael Ellerman
@ 2017-08-02  4:04     ` Scott Wood
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2017-08-02  4:04 UTC (permalink / raw)
  To: Michael Ellerman, Sergei Shtylyov, Kumar Gala,
	Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Thomas Petazzoni

On Mon, 2017-07-31 at 20:04 +1000, Michael Ellerman wrote:
> Scott Wood <oss@buserror.net> writes:
> 
> > On Sat, 2017-07-29 at 22:52 +0300, Sergei Shtylyov wrote:
> > > of_irq_to_resource() has recently been  fixed to return negative error
> > > #'s
> > > along with 0 in case of failure,  however the Freescale MPC832x RDB
> > > board
> > > code still only regards 0 as as failure indication -- fix it up.
> > > 
> > > Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in
> > > of_irq_to_resource()")
> > > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> > > 
> > > ---
> > > The patch is against the 'master' branch of Scott Wood's 'linux.git'
> > > repo
> > > (the 'fixes' branch is too much behind).
> > 
> > The master branch is also old.  Those branches are only used when needed
> > to
> > apply patches; I don't update them just to sync up.  If they're older than
> > what's in Michael's or Linus's tree (as they almost always are), then use
> > those instead.
> > 
> > Not that I expect it to make a difference to this patch...
> 
> Do you want me to grab this as a fix for 4.13 ?

Sure:
Acked-by: Scott Wood <oss@buserror.net>

-Scott

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

* Re: mpc832x_rdb: fix of_irq_to_resource() error check
  2017-07-29 19:52 [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check Sergei Shtylyov
  2017-07-30  1:51 ` Scott Wood
@ 2017-08-03 10:19 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-08-03 10:19 UTC (permalink / raw)
  To: Sergei Shtylyov, Scott Wood, Kumar Gala, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev
  Cc: Thomas Petazzoni, Sergei Shtylyov

On Sat, 2017-07-29 at 19:52:09 UTC, Sergei Shtylyov wrote:
> of_irq_to_resource() has recently been  fixed to return negative error #'s
> along with 0 in case of failure,  however the Freescale MPC832x RDB board
> code still only regards 0 as as failure indication -- fix it up.
> 
> Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Acked-by: Scott Wood <oss@buserror.net>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/f29bb7861a5107cc1afbf5a565c310

cheers

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

end of thread, other threads:[~2017-08-03 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-29 19:52 [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check Sergei Shtylyov
2017-07-30  1:51 ` Scott Wood
2017-07-31 10:04   ` Michael Ellerman
2017-08-02  4:04     ` Scott Wood
2017-08-03 10:19 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.