[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202204170750.Ftg38eOr-lkp@intel.com>
Date: Sun, 17 Apr 2022 07:06:08 +0800
From: kernel test robot <lkp@...el.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [lunn:v5.18-rc1-net-next-c45 38/44]
drivers/net/dsa/sja1105/sja1105_mdio.c:190:9: warning: variable 'tmp' is
uninitialized when used here
tree: https://github.com/lunn/linux.git v5.18-rc1-net-next-c45
head: a6ca6875280b5cf6ee1d8466840b71bf6ffb7bfd
commit: 47aade045321c64f7486052fb1cee153d0f6cbdc [38/44] net: dsa: sja1105: Separate C22 and C45 transactions for T1 MDIO bus
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220417/202204170750.Ftg38eOr-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 64c045e25b8471bbb572bd29159c294a82a86a25)
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
# https://github.com/lunn/linux/commit/47aade045321c64f7486052fb1cee153d0f6cbdc
git remote add lunn https://github.com/lunn/linux.git
git fetch --no-tags lunn v5.18-rc1-net-next-c45
git checkout 47aade045321c64f7486052fb1cee153d0f6cbdc
# 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/sja1105/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/dsa/sja1105/sja1105_mdio.c:190:9: warning: variable 'tmp' is uninitialized when used here [-Wuninitialized]
return tmp & 0xffff;
^~~
drivers/net/dsa/sja1105/sja1105_mdio.c:175:9: note: initialize the variable 'tmp' to silence this warning
u32 tmp;
^
= 0
1 warning generated.
vim +/tmp +190 drivers/net/dsa/sja1105/sja1105_mdio.c
5a8f09748ee79f Vladimir Oltean 2021-06-08 168
47aade045321c6 Andrew Lunn 2022-04-01 169 static int sja1105_base_t1_mdio_read_c45(struct mii_bus *bus, int phy,
47aade045321c6 Andrew Lunn 2022-04-01 170 int mmd, int reg)
47aade045321c6 Andrew Lunn 2022-04-01 171 {
47aade045321c6 Andrew Lunn 2022-04-01 172 struct sja1105_mdio_private *mdio_priv = bus->priv;
47aade045321c6 Andrew Lunn 2022-04-01 173 struct sja1105_private *priv = mdio_priv->priv;
47aade045321c6 Andrew Lunn 2022-04-01 174 u64 addr;
47aade045321c6 Andrew Lunn 2022-04-01 175 u32 tmp;
47aade045321c6 Andrew Lunn 2022-04-01 176 int rc;
5a8f09748ee79f Vladimir Oltean 2021-06-08 177
47aade045321c6 Andrew Lunn 2022-04-01 178 addr = sja1105_base_t1_encode_addr(priv, phy, SJA1105_C45_ADDR, mmd);
47aade045321c6 Andrew Lunn 2022-04-01 179
47aade045321c6 Andrew Lunn 2022-04-01 180 rc = sja1105_xfer_u32(priv, SPI_WRITE, addr, ®, NULL);
47aade045321c6 Andrew Lunn 2022-04-01 181 if (rc < 0)
47aade045321c6 Andrew Lunn 2022-04-01 182 return rc;
47aade045321c6 Andrew Lunn 2022-04-01 183
47aade045321c6 Andrew Lunn 2022-04-01 184 addr = sja1105_base_t1_encode_addr(priv, phy, SJA1105_C45_DATA, mmd);
47aade045321c6 Andrew Lunn 2022-04-01 185
47aade045321c6 Andrew Lunn 2022-04-01 186 rc = sja1105_xfer_u32(priv, SPI_READ, addr, ®, NULL);
5a8f09748ee79f Vladimir Oltean 2021-06-08 187 if (rc < 0)
5a8f09748ee79f Vladimir Oltean 2021-06-08 188 return rc;
5a8f09748ee79f Vladimir Oltean 2021-06-08 189
5a8f09748ee79f Vladimir Oltean 2021-06-08 @190 return tmp & 0xffff;
5a8f09748ee79f Vladimir Oltean 2021-06-08 191 }
5a8f09748ee79f Vladimir Oltean 2021-06-08 192
:::::: The code at line 190 was first introduced by commit
:::::: 5a8f09748ee79f2ef28e560bd095587a0e204b3d net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX
:::::: TO: Vladimir Oltean <vladimir.oltean@....com>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists