From: kernel test robot <lkp@intel.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Maxime Ripard <mripard@kernel.org>
Subject: drivers/gpu/drm/logicvc/logicvc_drm.c:233:26: warning: Local variable 'clocks' shadows outer variable [shadowVariable]
Date: Wed, 4 Jan 2023 22:28:40 +0800 [thread overview]
Message-ID: <202301042242.bCTJn52G-lkp@intel.com> (raw)
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
reply other threads:[~2023-01-04 14:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202301042242.bCTJn52G-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul.kocialkowski@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox