From: kernel test robot <lkp@intel.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [rmk-arm:zii 128/199] drivers/net/dsa/mv88e6xxx/serdes.c:1343:3: warning: variable 'reg' is uninitialized when used here
Date: Sun, 13 Mar 2022 00:11:01 +0800 [thread overview]
Message-ID: <202203130000.24KypUX4-lkp@intel.com> (raw)
tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 22f6fd6865d54d3632278e7f17bad52308e50311
commit: b222c2366f2aacc7b0b55d6fa78e903293aa9eaa [128/199] net: dsa: mv88e6xxx: provide and use mv88e6390_serdes_modify()
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220313/202203130000.24KypUX4-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 43f668b98e8d87290fc6bbf5ed13c3ab542e3497)
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
git remote add rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags rmk-arm zii
git checkout b222c2366f2aacc7b0b55d6fa78e903293aa9eaa
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/mv88e6xxx/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/dsa/mv88e6xxx/serdes.c:1343:3: warning: variable 'reg' is uninitialized when used here [-Wuninitialized]
reg |= MV88E6393X_SERDES_CTRL1_TX_PDOWN |
^~~
drivers/net/dsa/mv88e6xxx/serdes.c:1338:9: note: initialize the variable 'reg' to silence this warning
u16 reg;
^
= 0
1 warning generated.
vim +/reg +1343 drivers/net/dsa/mv88e6xxx/serdes.c
de776d0d316f72 Pavana Sharma 2021-03-17 1334
7527d66260ac0c Marek Behún 2021-11-30 1335 static int mv88e6393x_serdes_power_lane(struct mv88e6xxx_chip *chip, int lane,
7527d66260ac0c Marek Behún 2021-11-30 1336 bool on)
7527d66260ac0c Marek Behún 2021-11-30 1337 {
7527d66260ac0c Marek Behún 2021-11-30 1338 u16 reg;
7527d66260ac0c Marek Behún 2021-11-30 1339
7527d66260ac0c Marek Behún 2021-11-30 1340 if (on)
b222c2366f2aac Russell King (Oracle 2022-03-08 1341) reg = 0;
7527d66260ac0c Marek Behún 2021-11-30 1342 else
7527d66260ac0c Marek Behún 2021-11-30 @1343 reg |= MV88E6393X_SERDES_CTRL1_TX_PDOWN |
7527d66260ac0c Marek Behún 2021-11-30 1344 MV88E6393X_SERDES_CTRL1_RX_PDOWN;
7527d66260ac0c Marek Behún 2021-11-30 1345
b222c2366f2aac Russell King (Oracle 2022-03-08 1346) return mv88e6390_serdes_modify(chip, lane, MDIO_MMD_PHYXS,
b222c2366f2aac Russell King (Oracle 2022-03-08 1347) MV88E6393X_SERDES_CTRL1,
b222c2366f2aac Russell King (Oracle 2022-03-08 1348) MV88E6393X_SERDES_CTRL1_TX_PDOWN |
b222c2366f2aac Russell King (Oracle 2022-03-08 1349) MV88E6393X_SERDES_CTRL1_RX_PDOWN, reg);
7527d66260ac0c Marek Behún 2021-11-30 1350 }
7527d66260ac0c Marek Behún 2021-11-30 1351
:::::: The code at line 1343 was first introduced by commit
:::::: 7527d66260ac0c603c6baca5146748061fcddbd6 net: dsa: mv88e6xxx: Save power by disabling SerDes trasmitter and receiver
:::::: TO: Marek Behún <kabel@kernel.org>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-03-12 16:11 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=202203130000.24KypUX4-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