public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: warning: Local variable 'clocks' shadows outer variable [shadowVariable]
@ 2023-01-04 14:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-04 14:28 UTC (permalink / raw)
  To: Paul Kocialkowski; +Cc: oe-kbuild-all, linux-kernel, Maxime Ripard

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   69b41ac87e4a664de78a395ff97166f0b2943210
commit: efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5 drm: Add support for the LogiCVC display controller
date:   7 months ago
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout efeeaefe9be56e8ae5e5b4e9ff6d2275ec977ec5
        cppcheck --quiet --enable=style,performance,portability --template=gcc FILE

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

cppcheck warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: warning: Local variable 'clocks' shadows outer variable [shadowVariable]
     clk_disable_unprepare(*clocks[i]);
                            ^
   drivers/gpu/drm/logicvc/logicvc_drm.c:221:15: note: Shadowed declaration
    struct clk **clocks[] = {
                 ^
   drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: note: Shadow variable
     clk_disable_unprepare(*clocks[i]);
                            ^

vim +/clocks +233 drivers/gpu/drm/logicvc/logicvc_drm.c

   218	
   219	static int logicvc_clocks_unprepare(struct logicvc_drm *logicvc)
   220	{
   221		struct clk **clocks[] = {
   222			&logicvc->vclk,
   223			&logicvc->vclk2,
   224			&logicvc->lvdsclk,
   225			&logicvc->lvdsclkn,
   226		};
   227		unsigned int i;
   228	
   229		for (i = 0; i < ARRAY_SIZE(clocks); i++) {
   230			if (!*clocks[i])
   231				continue;
   232	
 > 233			clk_disable_unprepare(*clocks[i]);
   234			*clocks[i] = NULL;
   235		}
   236	
   237		return 0;
   238	}
   239	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2023-01-04 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 14:28 drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: warning: Local variable 'clocks' shadows outer variable [shadowVariable] kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox