From: kernel test robot <lkp@intel.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [rmk-arm:zii 88/102] drivers/net/dsa/mv88e6xxx/serdes-6352.c:116:6: error: variable 'err' is used uninitialized whenever 'if' condition is false
Date: Sat, 13 Nov 2021 02:39:58 +0800 [thread overview]
Message-ID: <202111130250.7ZCZ5xTp-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3399 bytes --]
tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 2f38af1897a020adf10ab01d8dc20ea8388b564d
commit: b53990e2eebb53cba059843e3c6e93b3b0c10c59 [88/102] net: dsa: mv88e6xxx: convert 88e6352 to phylink_pcs *EXPERIMENTAL*
config: arm-buildonly-randconfig-r002-20211112 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c3dddeeafb529e769cde87bd29ef6271ac6bfa5c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git remote add rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags rmk-arm zii
git checkout b53990e2eebb53cba059843e3c6e93b3b0c10c59
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/dsa/mv88e6xxx/serdes-6352.c:116:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (oldpage >= 0)
^~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:120:53: note: uninitialized use occurs here
return marvell_c22_pcs_restore_page(mpcs, oldpage, err);
^~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:116:2: note: remove the 'if' if its condition is always true
if (oldpage >= 0)
^~~~~~~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:113:18: note: initialize the variable 'err' to silence this warning
int oldpage, err;
^
= 0
drivers/net/dsa/mv88e6xxx/serdes-6352.c:189:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (oldpage >= 0)
^~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:193:53: note: uninitialized use occurs here
return marvell_c22_pcs_restore_page(mpcs, oldpage, err);
^~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:189:2: note: remove the 'if' if its condition is always true
if (oldpage >= 0)
^~~~~~~~~~~~~~~~~
drivers/net/dsa/mv88e6xxx/serdes-6352.c:182:23: note: initialize the variable 'err' to silence this warning
int oldpage, adv, err;
^
= 0
2 errors generated.
vim +116 drivers/net/dsa/mv88e6xxx/serdes-6352.c
109
110 static int marvell_c22_pcs_modify(struct marvell_c22_pcs *mpcs, u8 reg,
111 u16 mask, u16 val)
112 {
113 int oldpage, err;
114
115 oldpage = marvell_c22_pcs_set_fiber_page(mpcs);
> 116 if (oldpage >= 0)
117 err = __mdiobus_modify(mpcs->mdio.bus, mpcs->mdio.addr,
118 reg, mask, val);
119
120 return marvell_c22_pcs_restore_page(mpcs, oldpage, err);
121 }
122
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35220 bytes --]
reply other threads:[~2021-11-12 18:41 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=202111130250.7ZCZ5xTp-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=rmk+kernel@armlinux.org.uk \
/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
Powered by JetHome