All of lore.kernel.org
 help / color / mirror / Atom feed
* drivers/gpio/gpio-davinci.c:599 davinci_gpio_save_context() error: potentially dereferencing uninitialized 'g'.
@ 2024-12-26 11:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-26 11:29 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
CC: Linus Walleij <linus.walleij@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9b2ffa6148b1e4468d08f7e0e7e371c43cac9ffe
commit: 56d6ff4b8faf1c2d5c850ed8b4e5dfa6cd81413b gpio: davinci: allow building the module with COMPILE_TEST=y
date:   2 months ago
:::::: branch date: 2 days ago
:::::: commit date: 2 months ago
config: sh-randconfig-r071-20241225 (https://download.01.org/0day-ci/archive/20241226/202412261936.Ab2roJgJ-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412261936.Ab2roJgJ-lkp@intel.com/

smatch warnings:
drivers/gpio/gpio-davinci.c:599 davinci_gpio_save_context() error: potentially dereferencing uninitialized 'g'.

vim +/g +599 drivers/gpio/gpio-davinci.c

118150f22d6b44 KV Sujith       2013-08-18  577  
0651a730924b17 Devarsh Thakkar 2022-06-13  578  static void davinci_gpio_save_context(struct davinci_gpio_controller *chips,
0651a730924b17 Devarsh Thakkar 2022-06-13  579  				      u32 nbank)
0651a730924b17 Devarsh Thakkar 2022-06-13  580  {
0651a730924b17 Devarsh Thakkar 2022-06-13  581  	struct davinci_gpio_regs __iomem *g;
0651a730924b17 Devarsh Thakkar 2022-06-13  582  	struct davinci_gpio_regs *context;
0651a730924b17 Devarsh Thakkar 2022-06-13  583  	u32 bank;
0651a730924b17 Devarsh Thakkar 2022-06-13  584  	void __iomem *base;
0651a730924b17 Devarsh Thakkar 2022-06-13  585  
0651a730924b17 Devarsh Thakkar 2022-06-13  586  	base = chips->regs[0] - offset_array[0];
0651a730924b17 Devarsh Thakkar 2022-06-13  587  	chips->binten_context = readl_relaxed(base + BINTEN);
0651a730924b17 Devarsh Thakkar 2022-06-13  588  
0651a730924b17 Devarsh Thakkar 2022-06-13  589  	for (bank = 0; bank < nbank; bank++) {
0651a730924b17 Devarsh Thakkar 2022-06-13  590  		g = chips->regs[bank];
0651a730924b17 Devarsh Thakkar 2022-06-13  591  		context = &chips->context[bank];
0651a730924b17 Devarsh Thakkar 2022-06-13  592  		context->dir = readl_relaxed(&g->dir);
0651a730924b17 Devarsh Thakkar 2022-06-13  593  		context->set_data = readl_relaxed(&g->set_data);
0651a730924b17 Devarsh Thakkar 2022-06-13  594  		context->set_rising = readl_relaxed(&g->set_rising);
0651a730924b17 Devarsh Thakkar 2022-06-13  595  		context->set_falling = readl_relaxed(&g->set_falling);
0651a730924b17 Devarsh Thakkar 2022-06-13  596  	}
0651a730924b17 Devarsh Thakkar 2022-06-13  597  
0651a730924b17 Devarsh Thakkar 2022-06-13  598  	/* Clear all interrupt status registers */
0651a730924b17 Devarsh Thakkar 2022-06-13 @599  	writel_relaxed(GENMASK(31, 0), &g->intstat);
0651a730924b17 Devarsh Thakkar 2022-06-13  600  }
0651a730924b17 Devarsh Thakkar 2022-06-13  601  

:::::: The code at line 599 was first introduced by commit
:::::: 0651a730924b172476f67c7c6e01e898f84cd8f3 gpio: davinci: Add support for system suspend/resume PM

:::::: TO: Devarsh Thakkar <devarsht@ti.com>
:::::: CC: Bartosz Golaszewski <brgl@bgdev.pl>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-26 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-26 11:29 drivers/gpio/gpio-davinci.c:599 davinci_gpio_save_context() error: potentially dereferencing uninitialized 'g' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.