linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()
@ 2008-04-23 20:19 Roel Kluin
  2008-04-23 20:39 ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2008-04-23 20:19 UTC (permalink / raw)
  To: galak, linuxppc-dev; +Cc: lkml

mpc83xx_spi->irq is unsigned, so the test fails

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index be15a62..033fd51 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -454,12 +454,12 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev)
 		goto put_master;
 	}
 
-	mpc83xx_spi->irq = platform_get_irq(dev, 0);
-
-	if (mpc83xx_spi->irq < 0) {
-		ret = -ENXIO;
+	ret = platform_get_irq(dev, 0);
+	if (ret < 0)
 		goto unmap_io;
-	}
+
+	mpc83xx_spi->irq = ret;
+	ret = 0;
 
 	/* Register for SPI Interrupt */
 	ret = request_irq(mpc83xx_spi->irq, mpc83xx_spi_irq,

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

* Re: [PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()
  2008-04-23 20:19 [PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe() Roel Kluin
@ 2008-04-23 20:39 ` Kumar Gala
  2008-04-30 22:12   ` [spi-devel-general] " David Brownell
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2008-04-23 20:39 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linuxppc-dev@ozlabs.org list, lkml, spi-devel-general


On Apr 23, 2008, at 3:19 PM, Roel Kluin wrote:
> mpc83xx_spi->irq is unsigned, so the test fails
>
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

you should copy the linux-spi list on such patches.

- k

>
> ---
> diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
> index be15a62..033fd51 100644
> --- a/drivers/spi/spi_mpc83xx.c
> +++ b/drivers/spi/spi_mpc83xx.c
> @@ -454,12 +454,12 @@ static int __init mpc83xx_spi_probe(struct  
> platform_device *dev)
> 		goto put_master;
> 	}
>
> -	mpc83xx_spi->irq = platform_get_irq(dev, 0);
> -
> -	if (mpc83xx_spi->irq < 0) {
> -		ret = -ENXIO;
> +	ret = platform_get_irq(dev, 0);
> +	if (ret < 0)
> 		goto unmap_io;
> -	}
> +
> +	mpc83xx_spi->irq = ret;
> +	ret = 0;
>
> 	/* Register for SPI Interrupt */
> 	ret = request_irq(mpc83xx_spi->irq, mpc83xx_spi_irq,

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

* Re: [spi-devel-general] [PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()
  2008-04-23 20:39 ` Kumar Gala
@ 2008-04-30 22:12   ` David Brownell
  0 siblings, 0 replies; 3+ messages in thread
From: David Brownell @ 2008-04-30 22:12 UTC (permalink / raw)
  To: spi-devel-general; +Cc: linuxppc-dev@ozlabs.org list, Roel Kluin, lkml

On Wednesday 23 April 2008, Kumar Gala wrote:
> 
> On Apr 23, 2008, at 3:19 PM, Roel Kluin wrote:
> > mpc83xx_spi->irq is unsigned, so the test fails
> >
> > Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Any reason to not just make mpc83xx_spi->irq be "int",
following normal practice everywhere?  If not, I'll
roll that into the patch from Joakim Tjernlund...

- Dave

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

end of thread, other threads:[~2008-04-30 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 20:19 [PATCH] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe() Roel Kluin
2008-04-23 20:39 ` Kumar Gala
2008-04-30 22:12   ` [spi-devel-general] " David Brownell

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).