pinctrl: sirf: switch driver to use gpiolib irqchip helpers
A message that is not in the archive (sent off-list or not yet received): 20140502105536.GA32382@mwanda
A message that is not in the archive (sent off-list or not yet received): 5EB3BFCD089AD643B9BB63439F5FD5E9012BE8AD2D@SHAASIEXM01.ASIA.ROOT.PRI
Quoted 29 lines
Quoted 29 lines
-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter at oracle.com]
Sent: Friday, May 02, 2014 6:56 PM
To: linus.walleij at linaro.org
Cc: Barry Song; linux-arm-kernel at lists.infradead.org
Subject: re: pinctrl: sirf: switch driver to use gpiolib irqchip helpersHello Linus Walleij,
The patch
7420d2d09b12: "pinctrl: sirf: switch driver to use gpiolib irqchip helpers" from Apr 15, 2014, leads to the following static checker warning:
drivers/pinctrl/sirf/pinctrl-sirf.c:578sirfsoc_gpio_handle_irq()
warn: buffer overflow 'sgpio_chip.sgpio_bank' 5 <= 31
drivers/pinctrl/sirf/pinctrl-sirf.c
569 static void sirfsoc_gpio_handle_irq(unsigned int irq, structirq_desc
*desc)570 { 571 struct sirfsoc_gpio_bank *bank; 572 u32 status, ctrl; 573 int idx = 0; 574 struct irq_chip *chip = irq_get_chip(irq); 575 int i; 576 577 for (i = 0; i < SIRFSOC_GPIO_BANK_SIZE; i++) {
Quoted 1 line
Quoted 1 line
Probably i <
SIRFSOC_GPIO_NO_OF_BANKS(5) was intended here.
yes. it was a typo. i'll do a patch to fix it.
Quoted 8 lines
Quoted 8 lines
578 bank = &sgpio_chip.sgpio_bank[i]; 579 if (bank->parent_irq == irq) 580 break; 581 }regards,
dan carpenter
-barry