* drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
@ 2022-05-17 13:26 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-05-17 13:26 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3363 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Yang Yingliang <yangyingliang@huawei.com>
CC: Jakub Kicinski <kuba@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 42226c989789d8da4af1de0c31070c96726d990c
commit: 7c9896e37807862e276064dd9331860f5d27affc net: dsa: qca8k: check return value of read functions correctly
date: 12 months ago
:::::: branch date: 2 days ago
:::::: commit date: 12 months ago
compiler: powerpc64-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 7c9896e37807862e276064dd9331860f5d27affc
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
drivers/net/dsa/qca8k.c:1505:76: warning: Parameter 'br' can be declared with const [constParameter]
qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
^
drivers/net/dsa/qca8k.c:1534:77: warning: Parameter 'br' can be declared with const [constParameter]
qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
^
>> drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
^
drivers/net/dsa/qca8k.c:632:52: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_mii_read32, ret1, !(val & mask), 0,
^
vim +293 drivers/net/dsa/qca8k.c
6b93fb46480a9c John Crispin 2016-09-15 286
6b93fb46480a9c John Crispin 2016-09-15 287 static int
6b93fb46480a9c John Crispin 2016-09-15 288 qca8k_busy_wait(struct qca8k_priv *priv, u32 reg, u32 mask)
6b93fb46480a9c John Crispin 2016-09-15 289 {
7c9896e3780786 Yang Yingliang 2021-05-29 290 int ret, ret1;
2ad255f2faaffb Ansuel Smith 2021-05-14 291 u32 val;
6b93fb46480a9c John Crispin 2016-09-15 292
7c9896e3780786 Yang Yingliang 2021-05-29 @293 ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
2ad255f2faaffb Ansuel Smith 2021-05-14 294 0, QCA8K_BUSY_WAIT_TIMEOUT * USEC_PER_MSEC, false,
7c9896e3780786 Yang Yingliang 2021-05-29 295 priv, reg, &val);
6b93fb46480a9c John Crispin 2016-09-15 296
2ad255f2faaffb Ansuel Smith 2021-05-14 297 /* Check if qca8k_read has failed for a different reason
2ad255f2faaffb Ansuel Smith 2021-05-14 298 * before returning -ETIMEDOUT
2ad255f2faaffb Ansuel Smith 2021-05-14 299 */
7c9896e3780786 Yang Yingliang 2021-05-29 300 if (ret < 0 && ret1 < 0)
7c9896e3780786 Yang Yingliang 2021-05-29 301 return ret1;
6b93fb46480a9c John Crispin 2016-09-15 302
2ad255f2faaffb Ansuel Smith 2021-05-14 303 return ret;
6b93fb46480a9c John Crispin 2016-09-15 304 }
6b93fb46480a9c John Crispin 2016-09-15 305
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
@ 2022-04-17 22:06 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-04-17 22:06 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3510 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Yang Yingliang <yangyingliang@huawei.com>
CC: Jakub Kicinski <kuba@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a1901b464e7e3e28956ae7423db2847dbbfb5be8
commit: 7c9896e37807862e276064dd9331860f5d27affc net: dsa: qca8k: check return value of read functions correctly
date: 11 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 11 months ago
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 7c9896e37807862e276064dd9331860f5d27affc
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/net/phy/sfp-bus.c:442:12: warning: Uninitialized variable: sfp->fwnode [uninitvar]
if (sfp->fwnode == fwnode) {
^
--
drivers/net/dsa/qca8k.c:1505:76: warning: Parameter 'br' can be declared with const [constParameter]
qca8k_port_bridge_join(struct dsa_switch *ds, int port, struct net_device *br)
^
drivers/net/dsa/qca8k.c:1534:77: warning: Parameter 'br' can be declared with const [constParameter]
qca8k_port_bridge_leave(struct dsa_switch *ds, int port, struct net_device *br)
^
>> drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
^
drivers/net/dsa/qca8k.c:632:52: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_mii_read32, ret1, !(val & mask), 0,
^
vim +293 drivers/net/dsa/qca8k.c
6b93fb46480a9c John Crispin 2016-09-15 286
6b93fb46480a9c John Crispin 2016-09-15 287 static int
6b93fb46480a9c John Crispin 2016-09-15 288 qca8k_busy_wait(struct qca8k_priv *priv, u32 reg, u32 mask)
6b93fb46480a9c John Crispin 2016-09-15 289 {
7c9896e3780786 Yang Yingliang 2021-05-29 290 int ret, ret1;
2ad255f2faaffb Ansuel Smith 2021-05-14 291 u32 val;
6b93fb46480a9c John Crispin 2016-09-15 292
7c9896e3780786 Yang Yingliang 2021-05-29 @293 ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
2ad255f2faaffb Ansuel Smith 2021-05-14 294 0, QCA8K_BUSY_WAIT_TIMEOUT * USEC_PER_MSEC, false,
7c9896e3780786 Yang Yingliang 2021-05-29 295 priv, reg, &val);
6b93fb46480a9c John Crispin 2016-09-15 296
2ad255f2faaffb Ansuel Smith 2021-05-14 297 /* Check if qca8k_read has failed for a different reason
2ad255f2faaffb Ansuel Smith 2021-05-14 298 * before returning -ETIMEDOUT
2ad255f2faaffb Ansuel Smith 2021-05-14 299 */
7c9896e3780786 Yang Yingliang 2021-05-29 300 if (ret < 0 && ret1 < 0)
7c9896e3780786 Yang Yingliang 2021-05-29 301 return ret1;
6b93fb46480a9c John Crispin 2016-09-15 302
2ad255f2faaffb Ansuel Smith 2021-05-14 303 return ret;
6b93fb46480a9c John Crispin 2016-09-15 304 }
6b93fb46480a9c John Crispin 2016-09-15 305
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
@ 2021-11-24 22:31 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-24 22:31 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Yang Yingliang <yangyingliang@huawei.com>
CC: Jakub Kicinski <kuba@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5f53fa508db098c9d372423a6dac31c8a5679cdf
commit: 7c9896e37807862e276064dd9331860f5d27affc net: dsa: qca8k: check return value of read functions correctly
date: 6 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 6 months ago
compiler: mips-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 possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
^
drivers/net/dsa/qca8k.c:632:52: warning: Uninitialized variable: val [uninitvar]
ret = read_poll_timeout(qca8k_mii_read32, ret1, !(val & mask), 0,
^
vim +293 drivers/net/dsa/qca8k.c
6b93fb46480a9c John Crispin 2016-09-15 286
6b93fb46480a9c John Crispin 2016-09-15 287 static int
6b93fb46480a9c John Crispin 2016-09-15 288 qca8k_busy_wait(struct qca8k_priv *priv, u32 reg, u32 mask)
6b93fb46480a9c John Crispin 2016-09-15 289 {
7c9896e3780786 Yang Yingliang 2021-05-29 290 int ret, ret1;
2ad255f2faaffb Ansuel Smith 2021-05-14 291 u32 val;
6b93fb46480a9c John Crispin 2016-09-15 292
7c9896e3780786 Yang Yingliang 2021-05-29 @293 ret = read_poll_timeout(qca8k_read, ret1, !(val & mask),
2ad255f2faaffb Ansuel Smith 2021-05-14 294 0, QCA8K_BUSY_WAIT_TIMEOUT * USEC_PER_MSEC, false,
7c9896e3780786 Yang Yingliang 2021-05-29 295 priv, reg, &val);
6b93fb46480a9c John Crispin 2016-09-15 296
2ad255f2faaffb Ansuel Smith 2021-05-14 297 /* Check if qca8k_read has failed for a different reason
2ad255f2faaffb Ansuel Smith 2021-05-14 298 * before returning -ETIMEDOUT
2ad255f2faaffb Ansuel Smith 2021-05-14 299 */
7c9896e3780786 Yang Yingliang 2021-05-29 300 if (ret < 0 && ret1 < 0)
7c9896e3780786 Yang Yingliang 2021-05-29 301 return ret1;
6b93fb46480a9c John Crispin 2016-09-15 302
2ad255f2faaffb Ansuel Smith 2021-05-14 303 return ret;
6b93fb46480a9c John Crispin 2016-09-15 304 }
6b93fb46480a9c John Crispin 2016-09-15 305
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-17 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 13:26 drivers/net/dsa/qca8k.c:293:46: warning: Uninitialized variable: val [uninitvar] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2022-04-17 22:06 kernel test robot
2021-11-24 22:31 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.