[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202503041612.G8O0Bdrg-lkp@intel.com>
Date: Tue, 4 Mar 2025 17:07:44 +0800
From: kernel test robot <lkp@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>,
Michael Hennerich <michael.hennerich@...log.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mun Yew Tham <mun.yew.tham@...el.com>,
Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...econstruct.com.au>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pwm@...r.kernel.org, patches@...nsource.cirrus.com,
linux-arm-kernel@...ts.infradead.org, linux-aspeed@...ts.ozlabs.org
Subject: Re: [PATCH 02/15] gpio: adnp: use lock guards for the I2C lock
Hi Bartosz,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 9778568dede2166c7bd124d473f9ec365f782935]
url: https://github.com/intel-lab-lkp/linux/commits/Bartosz-Golaszewski/gpio-74x164-use-new-line-value-setter-callbacks/20250303-212738
base: 9778568dede2166c7bd124d473f9ec365f782935
patch link: https://lore.kernel.org/r/20250303-gpiochip-set-conversion-v1-2-1d5cceeebf8b%40linaro.org
patch subject: [PATCH 02/15] gpio: adnp: use lock guards for the I2C lock
config: x86_64-buildonly-randconfig-001-20250304 (https://download.01.org/0day-ci/archive/20250304/202503041612.G8O0Bdrg-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503041612.G8O0Bdrg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503041612.G8O0Bdrg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-adnp.c:241:8: warning: variable 'isr' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
241 | if (err < 0)
| ^~~~~~~
drivers/gpio/gpio-adnp.c:265:14: note: uninitialized use occurs here
265 | pending &= isr & ier;
| ^~~
drivers/gpio/gpio-adnp.c:241:4: note: remove the 'if' if its condition is always false
241 | if (err < 0)
| ^~~~~~~~~~~~
242 | continue;
| ~~~~~~~~
drivers/gpio/gpio-adnp.c:235:25: note: initialize the variable 'isr' to silence this warning
235 | u8 changed, level, isr, ier;
| ^
| = '\0'
>> drivers/gpio/gpio-adnp.c:245:8: warning: variable 'ier' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
245 | if (err < 0)
| ^~~~~~~
drivers/gpio/gpio-adnp.c:265:20: note: uninitialized use occurs here
265 | pending &= isr & ier;
| ^~~
drivers/gpio/gpio-adnp.c:245:4: note: remove the 'if' if its condition is always false
245 | if (err < 0)
| ^~~~~~~~~~~~
246 | continue;
| ~~~~~~~~
drivers/gpio/gpio-adnp.c:241:8: warning: variable 'ier' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
241 | if (err < 0)
| ^~~~~~~
drivers/gpio/gpio-adnp.c:265:20: note: uninitialized use occurs here
265 | pending &= isr & ier;
| ^~~
drivers/gpio/gpio-adnp.c:241:4: note: remove the 'if' if its condition is always false
241 | if (err < 0)
| ^~~~~~~~~~~~
242 | continue;
| ~~~~~~~~
drivers/gpio/gpio-adnp.c:235:30: note: initialize the variable 'ier' to silence this warning
235 | u8 changed, level, isr, ier;
| ^
| = '\0'
3 warnings generated.
vim +241 drivers/gpio/gpio-adnp.c
225
226 static irqreturn_t adnp_irq(int irq, void *data)
227 {
228 struct adnp *adnp = data;
229 unsigned int num_regs, i;
230
231 num_regs = 1 << adnp->reg_shift;
232
233 for (i = 0; i < num_regs; i++) {
234 unsigned int base = i << adnp->reg_shift, bit;
235 u8 changed, level, isr, ier;
236 unsigned long pending;
237 int err;
238
239 scoped_guard(mutex, &adnp->i2c_lock) {
240 err = adnp_read(adnp, GPIO_PLR(adnp) + i, &level);
> 241 if (err < 0)
242 continue;
243
244 err = adnp_read(adnp, GPIO_ISR(adnp) + i, &isr);
> 245 if (err < 0)
246 continue;
247
248 err = adnp_read(adnp, GPIO_IER(adnp) + i, &ier);
249 if (err < 0)
250 continue;
251 }
252
253 /* determine pins that changed levels */
254 changed = level ^ adnp->irq_level[i];
255
256 /* compute edge-triggered interrupts */
257 pending = changed & ((adnp->irq_fall[i] & ~level) |
258 (adnp->irq_rise[i] & level));
259
260 /* add in level-triggered interrupts */
261 pending |= (adnp->irq_high[i] & level) |
262 (adnp->irq_low[i] & ~level);
263
264 /* mask out non-pending and disabled interrupts */
265 pending &= isr & ier;
266
267 for_each_set_bit(bit, &pending, 8) {
268 unsigned int child_irq;
269 child_irq = irq_find_mapping(adnp->gpio.irq.domain,
270 base + bit);
271 handle_nested_irq(child_irq);
272 }
273 }
274
275 return IRQ_HANDLED;
276 }
277
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists