lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202301042242.bCTJn52G-lkp@intel.com>
Date:   Wed, 4 Jan 2023 22:28:40 +0800
From:   kernel test robot <lkp@...el.com>
To:     Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Maxime Ripard <mripard@...nel.org>
Subject: drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: warning: Local
 variable 'clocks' shadows outer variable [shadowVariable]

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ