[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Ve2sQ1i9tOAzOxuBmiA0G5djY6yXcQ_-P9ux6vnOr+DvQ@mail.gmail.com>
Date: Sat, 3 Jun 2023 23:59:46 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: kernel test robot <lkp@...el.com>
Cc: Jiasheng Jiang <jiasheng@...as.ac.cn>,
oe-kbuild-all@...ts.linux.dev, linus.walleij@...aro.org,
brgl@...ev.pl, palmer@...belt.com, paul.walmsley@...ive.com,
linux-gpio@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpio: sifive: Add missing check for platform_get_irq
On Sat, Jun 3, 2023 at 8:48 PM kernel test robot <lkp@...el.com> wrote:
>
> Hi Jiasheng,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on brgl/gpio/for-next]
> [also build test WARNING on linus/master v6.4-rc4 next-20230602]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Jiasheng-Jiang/gpio-sifive-Add-missing-check-for-platform_get_irq/20230602-152856
> base: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
> patch link: https://lore.kernel.org/r/20230602072755.7314-1-jiasheng%40iscas.ac.cn
> patch subject: [PATCH v2] gpio: sifive: Add missing check for platform_get_irq
> config: openrisc-randconfig-m041-20230531 (https://download.01.org/0day-ci/archive/20230604/202306040153.RPAlkz3U-lkp@intel.com/config)
> compiler: or1k-linux-gcc (GCC) 12.3.0
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202306040153.RPAlkz3U-lkp@intel.com/
>
> smatch warnings:
> drivers/gpio/gpio-sifive.c:226 sifive_gpio_probe() warn: unsigned 'chip->irq_number[i]' is never less than zero.
Nice!
...
> 224 for (i = 0; i < ngpio; i++) {
> 225 chip->irq_number[i] = platform_get_irq(pdev, i);
> > 226 if (chip->irq_number[i] < 0)
> 227 return chip->irq_number[i];
So, this should be
ret = ...
if (ret < 0)
return ret;
irq_number = ret;
> 228 }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists