[arm:zii 4/44] drivers/net/phy/marvell-88x2222.c:492:54: error: too few arguments to function call, expected 4, have 3

kernel test robot lkp at intel.com
Mon Jul 5 08:39:38 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: powerpc-buildonly-randconfig-r005-20210705 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 3f9bf9f42a9043e20c6d2a74dd4f47a90a7e2b41)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/net/phy/

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 >>):

   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:193:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/net/phy/marvell-88x2222.c:11:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:195:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/net/phy/marvell-88x2222.c:11:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:197:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/net/phy/marvell-88x2222.c:11:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:199:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/net/phy/marvell-88x2222.c:11:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:201:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/net/phy/marvell-88x2222.c:492:54: error: too few arguments to function call, expected 4, have 3
           sfp_parse_support(phydev->sfp_bus, id, sfp_supported);
           ~~~~~~~~~~~~~~~~~                                   ^
   include/linux/sfp.h:569:20: note: 'sfp_parse_support' declared here
   static inline void sfp_parse_support(struct sfp_bus *bus,
                      ^
   13 warnings and 1 error generated.


vim +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: 42200 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210705/aed8e3ab/attachment-0001.gz>


More information about the linux-arm-kernel mailing list