All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored
@ 2009-03-04 19:59 akpm
  0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2009-03-04 19:59 UTC (permalink / raw)
  To: jeff; +Cc: linux-ide, akpm, roel.kluin, alan

From: Roel Kluin <roel.kluin@gmail.com>

platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int,
it does not show when the IRQ resource wasn't found.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/ata/pata_rb532_cf.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored drivers/ata/pata_rb532_cf.c
--- a/drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored
+++ a/drivers/ata/pata_rb532_cf.c
@@ -117,11 +117,12 @@ static __devinit int rb532_pata_driver_p
 		return -EINVAL;
 	}
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret <= 0) {
 		dev_err(&pdev->dev, "no IRQ resource found\n");
 		return -ENOENT;
 	}
+	irq = ret;
 
 	gpio = irq_to_gpio(irq);
 	if (gpio < 0) {
_

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

* Re: [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored
  2009-05-12 20:44 akpm
@ 2009-05-12 21:17 ` Phil Sutter
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2009-05-12 21:17 UTC (permalink / raw)
  To: akpm; +Cc: jeff, linux-ide, roel.kluin, alan, florian

Hi!

On Tue, May 12, 2009 at 01:44:58PM -0700, akpm@linux-foundation.org wrote:
> From: Roel Kluin <roel.kluin@gmail.com>
> 
> platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int,
> it does not show when the IRQ resource wasn't found.

This no longer applies, as 'irq' is signed now. See Jeff's email to this
list (Message-ID: 49C9940B.5050704@garzik.org), in which he accepts an
appropriate patch by Florian Fainelli.

Greetings, Phil

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

* [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored
@ 2009-05-12 20:44 akpm
  2009-05-12 21:17 ` Phil Sutter
  0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2009-05-12 20:44 UTC (permalink / raw)
  To: jeff; +Cc: linux-ide, akpm, roel.kluin, alan, florian, n0-1

From: Roel Kluin <roel.kluin@gmail.com>

platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int,
it does not show when the IRQ resource wasn't found.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Phil Sutter <n0-1@freewrt.org>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/ata/pata_rb532_cf.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored drivers/ata/pata_rb532_cf.c
--- a/drivers/ata/pata_rb532_cf.c~pata-rb532-cf-platform_get_irq-failure-ignored
+++ a/drivers/ata/pata_rb532_cf.c
@@ -117,11 +117,12 @@ static __devinit int rb532_pata_driver_p
 		return -EINVAL;
 	}
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	ret = platform_get_irq(pdev, 0);
+	if (ret <= 0) {
 		dev_err(&pdev->dev, "no IRQ resource found\n");
 		return -ENOENT;
 	}
+	irq = ret;
 
 	gpio = irq_to_gpio(irq);
 	if (gpio < 0) {
_

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

end of thread, other threads:[~2009-05-12 21:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-04 19:59 [patch 1/1] pata-rb532-cf: platform_get_irq() failure ignored akpm
2009-05-12 20:44 akpm
2009-05-12 21:17 ` Phil Sutter

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.