Skip to contentSkip to conversation

gpio: davinci: Use signed type for 'irq' variable

PATCH In review Alexander Shiyan 2 participants 2 messages Feb 15, 2014 – Feb 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: davinci: Use signed type for 'irq' variable

Variable 'irq' is declared as unsigned and then used to store negative return values from irq_alloc_descs() such as -EINVAL. This patch fix this by declaring the variable as a signed.

---
 drivers/gpio/gpio-davinci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-davinci.c +2 -1
index 7629b4f..29321ee 100644
@@ -423,7 +423,8 @@ static const struct irq_domain_ops davinci_gpio_irq_ops = {
 
 static int davinci_gpio_irq_setup(struct platform_device *pdev)
 {
-	unsigned	gpio, irq, bank;
+	unsigned	gpio, bank;
+	int		irq;
 	struct clk	*clk;
 	u32		binten = 0;
 	unsigned	ngpio, bank_irq;
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 5 lines · Alexander Shiyan

Variable 'irq' is declared as unsigned and then used to store negative return values from irq_alloc_descs() such as -EINVAL. This patch fix this by declaring the variable as a signed.

Patch applied.

Yours,
Linus Walleij