Re: [PATCH v3 1/3] net: phy: mscc: move shared probe code into a helper

From: kernel test robot
Date: Mon Jun 15 2020 - 17:00:00 EST


Hi Heiko,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on sparc-next/master net/master linus/master v5.8-rc1 next-20200615]
[cannot apply to robh/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Heiko-Stuebner/net-phy-mscc-move-shared-probe-code-into-a-helper/20200615-224727
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cb8e59cc87201af93dfbb6c3dccc8fcad72a09c2
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/net/phy/mscc/mscc_main.c:2002:10: warning: variable 'vsc8531' is uninitialized when used here [-Wuninitialized]
vsc8531->base_addr, 0);
^~~~~~~
drivers/net/phy/mscc/mscc_main.c:1986:33: note: initialize the variable 'vsc8531' to silence this warning
struct vsc8531_private *vsc8531;
^
= NULL
1 warning generated.

vim +/vsc8531 +2002 drivers/net/phy/mscc/mscc_main.c

1983
1984 static int vsc8574_probe(struct phy_device *phydev)
1985 {
1986 struct vsc8531_private *vsc8531;
1987 int rc;
1988 u32 default_mode[4] = {VSC8531_LINK_1000_ACTIVITY,
1989 VSC8531_LINK_100_ACTIVITY, VSC8531_LINK_ACTIVITY,
1990 VSC8531_DUPLEX_COLLISION};
1991
1992 rc = vsc85xx_probe_helper(phydev, default_mode,
1993 ARRAY_SIZE(default_mode),
1994 VSC8584_SUPP_LED_MODES,
1995 vsc8584_hw_stats,
1996 ARRAY_SIZE(vsc8584_hw_stats));
1997 if (rc < 0)
1998 return rc;
1999
2000 vsc8584_get_base_addr(phydev);
2001 return devm_phy_package_join(&phydev->mdio.dev, phydev,
> 2002 vsc8531->base_addr, 0);
2003 }
2004

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip