Re: [PATCH RESEND net-next v3 2/3] net: enetc: Initialize SerDes for SGMII and USXGMII protocols

From: kernel test robot
Date: Thu Jul 02 2020 - 00:16:29 EST


Hi Michael,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url: https://github.com/0day-ci/linux/commits/Michael-Walle/net-enetc-remove-bootloader-dependency/20200702-053650
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 2b04a66156159592156a97553057e8c36de2ee70
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project c8f1d442d0858f66fd4128fde6f67eb5202fa2b1)
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 errors (new ones prefixed by >>):

>> drivers/net/ethernet/freescale/enetc/enetc_pf.c:879:2: error: implicit declaration of function 'devm_mdiobus_free' [-Werror,-Wimplicit-function-declaration]
devm_mdiobus_free(dev, bus);
^
1 error generated.

vim +/devm_mdiobus_free +879 drivers/net/ethernet/freescale/enetc/enetc_pf.c

835
836 static int enetc_imdio_init(struct enetc_pf *pf, bool is_c45)
837 {
838 struct device *dev = &pf->si->pdev->dev;
839 struct enetc_mdio_priv *mdio_priv;
840 struct phy_device *pcs;
841 struct mii_bus *bus;
842 int err;
843
844 bus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));
845 if (!bus)
846 return -ENOMEM;
847
848 bus->name = "Freescale ENETC internal MDIO Bus";
849 bus->read = enetc_mdio_read;
850 bus->write = enetc_mdio_write;
851 bus->parent = dev;
852 bus->phy_mask = ~0;
853 mdio_priv = bus->priv;
854 mdio_priv->hw = &pf->si->hw;
855 mdio_priv->mdio_base = ENETC_PM_IMDIO_BASE;
856 snprintf(bus->id, MII_BUS_ID_SIZE, "%s-imdio", dev_name(dev));
857
858 err = mdiobus_register(bus);
859 if (err) {
860 dev_err(dev, "cannot register internal MDIO bus (%d)\n", err);
861 goto free_mdio_bus;
862 }
863
864 pcs = get_phy_device(bus, 0, is_c45);
865 if (IS_ERR(pcs)) {
866 err = PTR_ERR(pcs);
867 dev_err(dev, "cannot get internal PCS PHY (%d)\n", err);
868 goto unregister_mdiobus;
869 }
870
871 pf->imdio = bus;
872 pf->pcs = pcs;
873
874 return 0;
875
876 unregister_mdiobus:
877 mdiobus_unregister(bus);
878 free_mdio_bus:
> 879 devm_mdiobus_free(dev, bus);
880 return err;
881 }
882

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

Attachment: .config.gz
Description: application/gzip