pinctrl: sirf: fix typo for GPIO bank number
PATCH 1/1 pinctrl: sirf: fix typo for GPIO bank number
From: Barry Song <[email protected]>
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:578 sirfsoc_gpio_handle_irq()
warn: buffer overflow 'sgpio_chip.sgpio_bank' 5 <= 31
--- drivers/pinctrl/sirf/pinctrl-sirf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/sirf/pinctrl-sirf.c +2 -2
@@ -574,12 +574,12 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)struct irq_chip *chip =irq_get_chip (irq);int i; -for (i =0 ; i <SIRFSOC_GPIO_BANK_SIZE ; i++) { +for (i =0 ; i <SIRFSOC_GPIO_NO_OF_BANKS ; i++) { bank = &sgpio_chip.sgpio_bank[i];if (bank->parent_irq == irq)break ; } -BUG_ON (i ==SIRFSOC_GPIO_BANK_SIZE ); +BUG_ON (i ==SIRFSOC_GPIO_NO_OF_BANKS );chained_irq_enter (chip, desc);
Signature · 1 line
1.9.3
PATCH 1/1 pinctrl: sirf: fix typo for GPIO bank number
Quoted 11 lines · Barry Song
From: Barry Song <[email protected]>
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 <= 31Cc Dan Carpenter <[email protected]>Signed-off-by Barry Song <[email protected]>
Patch applied!
Yours,
Linus Walleij