public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed
@ 2008-04-23 21:59 Roel Kluin
  2008-04-24  6:12 ` Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Roel Kluin @ 2008-04-23 21:59 UTC (permalink / raw)
  To: ben-linux, Linux-arm, lkml

dev->irq is unsigned, platform_get_irq() may return signed unnoticed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 4ffa258..da5a02c 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1022,6 +1022,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 	struct uart_port *port = &ourport->port;
 	struct s3c2410_uartcfg *cfg;
 	struct resource *res;
+	int ret;
 
 	dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev);
 
@@ -1064,9 +1065,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
 
 	port->mapbase	= res->start;
 	port->membase	= S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART);
-	port->irq	= platform_get_irq(platdev, 0);
-	if (port->irq < 0)
+	ret = platform_get_irq(platdev, 0);
+	if (ret < 0)
 		port->irq = 0;
+	else
+		port->irq = ret;
 
 	ourport->clk	= clk_get(&platdev->dev, "uart");
 

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

* Re: [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed
  2008-04-23 21:59 [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed Roel Kluin
@ 2008-04-24  6:12 ` Uwe Kleine-König
  2008-04-24 10:17 ` Alan Cox
  2008-04-24 10:18 ` Alan Cox
  2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2008-04-24  6:12 UTC (permalink / raw)
  To: Roel Kluin; +Cc: ben-linux, Linux-arm, lkml

Roel Kluin wrote:
> dev->irq is unsigned, platform_get_irq() may return signed unnoticed
This must read "port->irq is unsigned", apart from that it looks fine.

Uwe

-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962

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

* Re: [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed
  2008-04-23 21:59 [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed Roel Kluin
  2008-04-24  6:12 ` Uwe Kleine-König
@ 2008-04-24 10:17 ` Alan Cox
  2008-04-24 10:18 ` Alan Cox
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2008-04-24 10:17 UTC (permalink / raw)
  To: Roel Kluin; +Cc: ben-linux, Linux-arm, lkml

On Wed, 23 Apr 2008 23:59:36 +0200
Roel Kluin <12o3l@tiscali.nl> wrote:

> dev->irq is unsigned, platform_get_irq() may return signed unnoticed
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Acked-by: Alan Cox <alan@redhat.com>

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

* Re: [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed
  2008-04-23 21:59 [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed Roel Kluin
  2008-04-24  6:12 ` Uwe Kleine-König
  2008-04-24 10:17 ` Alan Cox
@ 2008-04-24 10:18 ` Alan Cox
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2008-04-24 10:18 UTC (permalink / raw)
  To: Roel Kluin; +Cc: ben-linux, Linux-arm, lkml

On Wed, 23 Apr 2008 23:59:36 +0200
Roel Kluin <12o3l@tiscali.nl> wrote:

> dev->irq is unsigned, platform_get_irq() may return signed unnoticed
> 
> Signed-off-by: Roel Kluin <12o3l@tiscali.nl>

Acked-by: Alan Cox <alan@redhat.com>


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

end of thread, other threads:[~2008-04-24 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 21:59 [PATCH] serial: s3c2410: platform_get_irq() may return signed unnoticed Roel Kluin
2008-04-24  6:12 ` Uwe Kleine-König
2008-04-24 10:17 ` Alan Cox
2008-04-24 10:18 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox