diff options
author | Barry Song <Baohua.Song@csr.com> | 2014-05-25 04:54:23 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-05-27 09:25:05 -0400 |
commit | 648e42e1401542d153090f188d0ef3406a40ac76 (patch) | |
tree | a1ac14baceca3735307959e92b6a95505102084b /drivers/pinctrl | |
parent | de5af04e3ef598759bf67f990c77b71a76e35704 (diff) |
pinctrl: sirf: fix typo for GPIO bank number
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
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/sirf/pinctrl-sirf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c index c03dcc7729eb..a4ea3f739ded 100644 --- a/drivers/pinctrl/sirf/pinctrl-sirf.c +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c | |||
@@ -574,12 +574,12 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc) | |||
574 | struct irq_chip *chip = irq_get_chip(irq); | 574 | struct irq_chip *chip = irq_get_chip(irq); |
575 | int i; | 575 | int i; |
576 | 576 | ||
577 | for (i = 0; i < SIRFSOC_GPIO_BANK_SIZE; i++) { | 577 | for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) { |
578 | bank = &sgpio_chip.sgpio_bank[i]; | 578 | bank = &sgpio_chip.sgpio_bank[i]; |
579 | if (bank->parent_irq == irq) | 579 | if (bank->parent_irq == irq) |
580 | break; | 580 | break; |
581 | } | 581 | } |
582 | BUG_ON (i == SIRFSOC_GPIO_BANK_SIZE); | 582 | BUG_ON(i == SIRFSOC_GPIO_NO_OF_BANKS); |
583 | 583 | ||
584 | chained_irq_enter(chip, desc); | 584 | chained_irq_enter(chip, desc); |
585 | 585 | ||