Skip to contentSkip to conversation

spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

PATCH Superseded Roel Kluin 4 participants 6 messages Apr 23, 2008 – May 7, 2008 1 message not in the archive SPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/2 spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

mpc83xx_spi->irq is unsigned, so the test fails

---

drivers/spi/spi_mpc83xx.c +5 -5
index be15a62..033fd51 100644
@@ -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,

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

#1 lore raw
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linuxppc-dev- [email protected]] On Behalf Of Roel Kluin
Sent: den 23 april 2008 22:55
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; lkml
Subject: [PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

mpc83xx_spi->irq is unsigned, so the test fails

hmm, I got a pretty large 83xx spi patch queued at dbrownell. I hope that one can be applied first. Then you probably need to rediff this patch.

David, any progress on my patch?

Jocke

Quoted 29 lines

---

drivers/spi/spi_mpc83xx.c +5 -5
index be15a62..033fd51 100644
@@ -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,

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#3 lore raw
In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: linuxppc-dev-bounces+joakim.tjernlund=transmode.se-mnsaURCQ41sdnm+yROfE0A@public.gmane.org [mailto:linuxppc-dev- bounces+joakim.tjernlund=transmode.se-mnsaURCQ41sdnm+yROfE0A@public.gmane.org] On Behalf Of Roel Kluin
Sent: den 23 april 2008 22:55
To: [email protected]; [email protected]
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; [email protected]; lkml
Subject: [PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

mpc83xx_spi->irq is unsigned, so the test fails

hmm, I got a pretty large 83xx spi patch queued at dbrownell. I hope that one can be applied first. Then you probably need to rediff this patch.

David, any progress on my patch?

Jocke

Quoted 24 lines

---

drivers/spi/spi_mpc83xx.c +5 -5
index be15a62..033fd51 100644
@@ -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,
Quoted 5 lines

_______________________________________________
Linuxppc-dev mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

#4 lore raw
In reply to Roel Kluin
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:linuxppc-dev- [email protected]] On Behalf Of Roel Kluin
Sent: den 23 april 2008 22:55
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; lkml
Subject: [PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

mpc83xx_spi->irq is unsigned, so the test fails

hmm, I got a pretty large 83xx spi patch queued at dbrownell. I hope that one can be applied first. Then you probably need to rediff this patch.

David, any progress on my patch?

Jocke

Quoted 29 lines

---

drivers/spi/spi_mpc83xx.c +5 -5
index be15a62..033fd51 100644
@@ -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,

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#5 lore raw
Quoted 8 lines · Joakim Tjernlund
Quoted 8 lines

-----Original Message-----
From: linuxppc-dev-bounces+joakim.tjernlund=transmode.se-mnsaURCQ41sdnm+yROfE0A@public.gmane.org [mailto:linuxppc-dev- bounces+joakim.tjernlund=transmode.se-mnsaURCQ41sdnm+yROfE0A@public.gmane.org] On Behalf Of Roel Kluin
Sent: den 23 april 2008 22:55
To: [email protected]; [email protected]
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; [email protected]; lkml
Subject: [PATCH 1/2] spi_mpc83xx: test below 0 on unsigned irq in mpc83xx_spi_probe()

Quoted 8 lines
Quoted 3 lines

mpc83xx_spi->irq is unsigned, so the test fails

hmm, I got a pretty large 83xx spi patch queued at dbrownell. I hope that one can be applied first. Then you probably need to rediff this patch.

David, any progress on my patch?

David, heard nothing from you in a while. Don't you get my mails?

Jocke

Quoted 26 lines

Jocke

Quoted 24 lines

---

drivers/spi/spi_mpc83xx.c +5 -5
index be15a62..033fd51 100644
@@ -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,
Quoted 13 lines
Quoted 5 lines

_______________________________________________
Linuxppc-dev mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

_______________________________________________
Linuxppc-dev mailing list [email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

#6 lore raw
In reply to Roel Kluin
Quoted 17 lines · On Wed, 23 Apr 2008 22:55:16 +0200 Roel Kluin…

mpc83xx_spi->irq is unsigned, so the test fails

---

drivers/spi/spi_mpc83xx.c +0 -4
index be15a62..033fd51 100644
@@ -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;

drivers/spi/spi_mpc83xx.c static int __init mpc83xx_spi_probe(struct platform_device *dev) · line 465

Quoted 10 lines
drivers/spi/spi_mpc83xx.c +5 -1
+	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,

In the recently-merged spi_mpc83xx-much-improved-driver.patch, mpc83xx_spi.irq has type `int' so I don't think we need this fix any more.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone