Patchwork rtc: jz4740: signedness bug

login
register
mail settings
Submitter Dan Carpenter
Date Nov. 13, 2010, 6:26 p.m.
Message ID <20101113182626.GC1795@bicker>
Download mbox | patch
Permalink /patch/71066/
State New
Headers show

Comments

Dan Carpenter - Nov. 13, 2010, 6:26 p.m.
platform_get_irq() can return negatives so the rtc->irq should be signed
to handle it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Lars-Peter Clausen - Nov. 13, 2010, 8:02 p.m.
Dan Carpenter wrote:
> platform_get_irq() can return negatives so the rtc->irq should be signed
> to handle it.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Acked-By: Lars-Peter Clausen <lars@metafoo.de>

Thanks.
> 
> diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
> index 2e16f72..cfcd2da 100644
> --- a/drivers/rtc/rtc-jz4740.c
> +++ b/drivers/rtc/rtc-jz4740.c
> @@ -42,7 +42,7 @@ struct jz4740_rtc {
>  
>  	struct rtc_device *rtc;
>  
> -	unsigned int irq;
> +	int irq;
>  
>  	spinlock_t lock;
>  };

Patch

diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 2e16f72..cfcd2da 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -42,7 +42,7 @@  struct jz4740_rtc {
 
 	struct rtc_device *rtc;
 
-	unsigned int irq;
+	int irq;
 
 	spinlock_t lock;
 };