Thread (1 message) 1 message, 1 author, 2014-05-02

pinctrl: sirf: switch driver to use gpiolib irqchip helpers

From: Barry Song <hidden>
Date: 2014-05-02 16:09:20

quoted
-----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.
quoted
   578                  bank = &sgpio_chip.sgpio_bank[i];
   579                  if (bank->parent_irq == irq)
   580                          break;
   581          }

regards,
dan carpenter
-barry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help