pinctrl: sirf: switch driver to use gpiolib irqchip helpers

Barry Song 21cnbao at gmail.com
Fri May 2 09:09:20 PDT 2014


>
>
>> -----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 helpers
>>
>> Hello 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:578 sirfsoc_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, struct irq_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++) {
>>
>> Probably i < SIRFSOC_GPIO_NO_OF_BANKS (5) was intended here.

yes. it was a typo. i'll do a patch to fix it.

>>
>>    578                  bank = &sgpio_chip.sgpio_bank[i];
>>    579                  if (bank->parent_irq == irq)
>>    580                          break;
>>    581          }
>>
>> regards,
>> dan carpenter

-barry



More information about the linux-arm-kernel mailing list