From: "Chen, Rong A" <rong.a.chen@intel.com>
To: Randy Dunlap <rdunlap@infradead.org>,
kernel test robot <lkp@intel.com>,
Ben Widawsky <ben.widawsky@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [kbuild-all] Re: drivers/cxl/pci.c:439:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
Date: Wed, 6 Apr 2022 19:17:12 +0800 [thread overview]
Message-ID: <810c4865-45c1-ec93-4f72-2086461756c3@intel.com> (raw)
In-Reply-To: <e4d381f0-bafc-771b-7298-cfc6685776f0@infradead.org>
On 4/4/2022 3:29 AM, Randy Dunlap wrote:
> Hi lkp/ktr,
>
> On 4/2/22 04:26, kernel test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head: 88e6c0207623874922712e162e25d9dafd39661e
>> commit: 523e594d9cc03db962c741ce02c8a58aab58a123 cxl/pci: Implement wait for media active
>> date: 7 weeks ago
>> compiler: alpha-linux-gcc (GCC) 11.2.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>>
>> cppcheck warnings: (new ones prefixed by >>)
>>>> drivers/cxl/pci.c:439:7: warning: Local variable 'rc' shadows outer variable [shadowVariable]
>> int rc;
>> ^
>> drivers/cxl/pci.c:431:6: note: Shadowed declaration
>> int rc, i;
>> ^
>> drivers/cxl/pci.c:439:7: note: Shadow variable
>> int rc;
>> ^
>>
>> cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>>
>>>> drivers/cxl/port.c:63:1: warning: There is an unknown macro here somewhere. Configuration is required. If __stringify is a macro then please configure it. [unknownMacro]
>> MODULE_ALIAS_CXL(CXL_DEVICE_PORT);
>> ^
>> --
>
> Can you provide a cppcheck config file and command line
> for this, please?
Hi Randy,
The below command can show the warning:
$ cppcheck --quiet --enable=style,performance,portability --template=gcc
drivers/cxl/port.c
drivers/cxl/port.c:63:1: warning: There is an unknown macro here
somewhere. Configuration is required. If __stringify is a macro then
please configure it. [unknownMacro]
MODULE_ALIAS_CXL(CXL_DEVICE_PORT);
^
Best Regards,
Rong Chen
>
> My naive testing does not see any of these warnings --
> although I can easily spot the problems in the source file.
>
> thanks.
>
next prev parent reply other threads:[~2022-04-06 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 11:26 kernel test robot
2022-04-03 19:29 ` Randy Dunlap
2022-04-06 11:17 ` Chen, Rong A [this message]
2022-04-07 0:11 ` [kbuild-all] " Randy Dunlap
2022-04-08 3:34 ` Chen, Rong A
2022-04-08 4:37 ` Randy Dunlap
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=810c4865-45c1-ec93-4f72-2086461756c3@intel.com \
--to=rong.a.chen@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=ben.widawsky@intel.com \
--cc=dan.j.williams@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=rdunlap@infradead.org \
/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
all inboxes | Powered by JetHome®