[arm:zii 4/44] drivers/net/phy/marvell-88x2222.c:492:2: error: too few arguments to function 'sfp_parse_support'

kernel test robot lkp at intel.com
Mon Jul 5 08:59:49 PDT 2021


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head:   2204ce3ae7d42297a56dbbee583ea05408f01cfe
commit: 62545605e012f24e30377628705cf55724759539 [4/44] net: sfp: augment SFP parsing with phy_interface_t bitmap
config: x86_64-buildonly-randconfig-r004-20210705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
        git fetch --no-tags arm zii
        git checkout 62545605e012f24e30377628705cf55724759539
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   drivers/net/phy/marvell-88x2222.c: In function 'mv2222_sfp_insert':
>> drivers/net/phy/marvell-88x2222.c:492:2: error: too few arguments to function 'sfp_parse_support'
     492 |  sfp_parse_support(phydev->sfp_bus, id, sfp_supported);
         |  ^~~~~~~~~~~~~~~~~
   In file included from drivers/net/phy/marvell-88x2222.c:19:
   include/linux/sfp.h:569:20: note: declared here
     569 | static inline void sfp_parse_support(struct sfp_bus *bus,
         |                    ^~~~~~~~~~~~~~~~~


vim +/sfp_parse_support +492 drivers/net/phy/marvell-88x2222.c

6e3bac3eba448a Ivan Bornyakov 2021-03-15  478  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  479  static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
6e3bac3eba448a Ivan Bornyakov 2021-03-15  480  {
6e3bac3eba448a Ivan Bornyakov 2021-03-15  481  	struct phy_device *phydev = upstream;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  482  	phy_interface_t sfp_interface;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  483  	struct mv2222_data *priv;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  484  	struct device *dev;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  485  	int ret;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  486  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  487  	__ETHTOOL_DECLARE_LINK_MODE_MASK(sfp_supported) = { 0, };
6e3bac3eba448a Ivan Bornyakov 2021-03-15  488  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  489  	priv = (struct mv2222_data *)phydev->priv;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  490  	dev = &phydev->mdio.dev;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  491  
6e3bac3eba448a Ivan Bornyakov 2021-03-15 @492  	sfp_parse_support(phydev->sfp_bus, id, sfp_supported);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  493  	sfp_interface = sfp_select_interface(phydev->sfp_bus, sfp_supported);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  494  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  495  	dev_info(dev, "%s SFP module inserted\n", phy_modes(sfp_interface));
6e3bac3eba448a Ivan Bornyakov 2021-03-15  496  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  497  	if (sfp_interface != PHY_INTERFACE_MODE_10GBASER &&
6e3bac3eba448a Ivan Bornyakov 2021-03-15  498  	    sfp_interface != PHY_INTERFACE_MODE_1000BASEX &&
6e3bac3eba448a Ivan Bornyakov 2021-03-15  499  	    sfp_interface != PHY_INTERFACE_MODE_SGMII) {
6e3bac3eba448a Ivan Bornyakov 2021-03-15  500  		dev_err(dev, "Incompatible SFP module inserted\n");
6e3bac3eba448a Ivan Bornyakov 2021-03-15  501  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  502  		return -EINVAL;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  503  	}
6e3bac3eba448a Ivan Bornyakov 2021-03-15  504  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  505  	priv->line_interface = sfp_interface;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  506  	linkmode_and(priv->supported, phydev->supported, sfp_supported);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  507  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  508  	ret = mv2222_config_line(phydev);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  509  	if (ret < 0)
6e3bac3eba448a Ivan Bornyakov 2021-03-15  510  		return ret;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  511  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  512  	if (mutex_trylock(&phydev->lock)) {
6e3bac3eba448a Ivan Bornyakov 2021-03-15  513  		ret = mv2222_config_aneg(phydev);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  514  		mutex_unlock(&phydev->lock);
6e3bac3eba448a Ivan Bornyakov 2021-03-15  515  	}
6e3bac3eba448a Ivan Bornyakov 2021-03-15  516  
6e3bac3eba448a Ivan Bornyakov 2021-03-15  517  	return ret;
6e3bac3eba448a Ivan Bornyakov 2021-03-15  518  }
6e3bac3eba448a Ivan Bornyakov 2021-03-15  519  

:::::: The code at line 492 was first introduced by commit
:::::: 6e3bac3eba448a438840ab8152cb8bbfcb8787b8 net: phy: add Marvell 88X2222 transceiver support

:::::: TO: Ivan Bornyakov <i.bornyakov at metrotek.ru>
:::::: CC: David S. Miller <davem at davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 39824 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210705/f9f55255/attachment-0001.gz>


More information about the linux-arm-kernel mailing list