From: kernel test robot <rong.a.chen@intel.com>
To: Alexey Dobriyan <adobriyan@gmail.com>,
gregkh@linuxfoundation.org, rafael@kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: cleanup kstrto*() usage
Date: Mon, 23 Nov 2020 08:31:06 +0800 [thread overview]
Message-ID: <20201123003106.GX3723@shao2-debian> (raw)
In-Reply-To: <20201122121018.GA48617@localhost.localdomain>
Hi Alexey,
I love your patch! Perhaps something to improve:
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on v5.10-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexey-Dobriyan/driver-core-cleanup-kstrto-usage/20201122-201458
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 33c0c9bdf7a59051a654cd98b7d2b48ce0080967
compiler: riscv64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
drivers/base/core.c:3196:10: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
return *tmp;
^
drivers/base/core.c:3195:6: note: outer condition: *tmp
if (*tmp)
^
drivers/base/core.c:3196:10: note: identical inner condition: *tmp
return *tmp;
^
drivers/base/core.c:3202:10: warning: Identical inner 'return' condition is always true. [identicalInnerCondition]
return *tmp;
^
drivers/base/core.c:3201:6: note: outer condition: *tmp
if (*tmp)
^
drivers/base/core.c:3202:10: note: identical inner condition: *tmp
return *tmp;
^
>> drivers/base/core.c:1725:6: warning: Unused variable: val [unusedVariable]
int val;
^
vim +1725 drivers/base/core.c
ca22e56debc57b Kay Sievers 2011-12-14 1719
ca22e56debc57b Kay Sievers 2011-12-14 1720 ssize_t device_store_int(struct device *dev,
ca22e56debc57b Kay Sievers 2011-12-14 1721 struct device_attribute *attr,
ca22e56debc57b Kay Sievers 2011-12-14 1722 const char *buf, size_t size)
ca22e56debc57b Kay Sievers 2011-12-14 1723 {
ca22e56debc57b Kay Sievers 2011-12-14 1724 struct dev_ext_attribute *ea = to_ext_attr(attr);
e7443ff26978ad Alexey Dobriyan 2020-11-22 @1725 int val;
f88184bfee48d4 Kaitao cheng 2018-11-06 1726 int ret;
f88184bfee48d4 Kaitao cheng 2018-11-06 1727
e7443ff26978ad Alexey Dobriyan 2020-11-22 1728 ret = kstrtoint(buf, 0, (int *)ea->var);
f88184bfee48d4 Kaitao cheng 2018-11-06 1729 if (ret)
f88184bfee48d4 Kaitao cheng 2018-11-06 1730 return ret;
ca22e56debc57b Kay Sievers 2011-12-14 1731 /* Always return full write size even if we didn't consume all */
ca22e56debc57b Kay Sievers 2011-12-14 1732 return size;
ca22e56debc57b Kay Sievers 2011-12-14 1733 }
ca22e56debc57b Kay Sievers 2011-12-14 1734 EXPORT_SYMBOL_GPL(device_store_int);
ca22e56debc57b Kay Sievers 2011-12-14 1735
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2020-11-23 0:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-22 12:10 [PATCH] driver core: cleanup kstrto*() usage Alexey Dobriyan
2020-11-23 0:31 ` kernel test robot [this message]
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=20201123003106.GX3723@shao2-debian \
--to=rong.a.chen@intel.com \
--cc=adobriyan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.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