[arm:zii 147/186] drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1531:56: error: passing argument 1 of 'pcs_to_axienet_local' from incompatible pointer type
kernel test robot
lkp at intel.com
Tue Dec 14 17:43:00 PST 2021
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head: d3ebd79d7fb6476e2409c147e4dcc304733f7ae6
commit: dc659b3d109e3e55a76c0ed143119dad7b369ec8 [147/186] net: axienet: convert to phylink_pcs
config: arm-randconfig-r011-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150906.gbKc24gn-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
git fetch --no-tags arm zii
git checkout dc659b3d109e3e55a76c0ed143119dad7b369ec8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/net/dsa/ drivers/net/ethernet/xilinx/
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/ethernet/xilinx/xilinx_axienet_main.c: In function 'axienet_pcs_config':
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1531:56: error: passing argument 1 of 'pcs_to_axienet_local' from incompatible pointer type [-Werror=incompatible-pointer-types]
1531 | struct net_device *ndev = pcs_to_axienet_local(pcs)->ndev;
| ^~~
| |
| struct phylink_config *
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1506:71: note: expected 'struct phylink_pcs *' but argument is of type 'struct phylink_config *'
1506 | static struct axienet_local *pcs_to_axienet_local(struct phylink_pcs *pcs)
| ~~~~~~~~~~~~~~~~~~~~^~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1532:60: error: passing argument 1 of 'pcs_to_axienet_local' from incompatible pointer type [-Werror=incompatible-pointer-types]
1532 | struct mdio_device *pcs_phy = pcs_to_axienet_local(pcs)->pcs_phy;
| ^~~
| |
| struct phylink_config *
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1506:71: note: expected 'struct phylink_pcs *' but argument is of type 'struct phylink_config *'
1506 | static struct axienet_local *pcs_to_axienet_local(struct phylink_pcs *pcs)
| ~~~~~~~~~~~~~~~~~~~~^~~
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1537:29: error: 'iface' undeclared (first use in this function)
1537 | iface == PHY_INTERFACE_MODE_SGMII ?
| ^~~~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1537:29: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/xilinx/xilinx_axienet_main.c: At top level:
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1554:23: error: initialization of 'int (*)(struct phylink_pcs *, unsigned int, phy_interface_t, const long unsigned int *, bool)' {aka 'int (*)(struct phylink_pcs *, unsigned int, phy_interface_t, const long unsigned int *, _Bool)'} from incompatible pointer type 'int (*)(struct phylink_config *, unsigned int, phy_interface_t, const long unsigned int *, bool)' {aka 'int (*)(struct phylink_config *, unsigned int, phy_interface_t, const long unsigned int *, _Bool)'} [-Werror=incompatible-pointer-types]
1554 | .pcs_config = axienet_pcs_config,
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/xilinx/xilinx_axienet_main.c:1554:23: note: (near initialization for 'axienet_pcs_ops.pcs_config')
cc1: some warnings being treated as errors
vim +/pcs_to_axienet_local +1531 drivers/net/ethernet/xilinx/xilinx_axienet_main.c
1525
1526 static int axienet_pcs_config(struct phylink_config *pcs, unsigned int mode,
1527 phy_interface_t interface,
1528 const unsigned long *advertising,
1529 bool permit_pause_to_mac)
1530 {
> 1531 struct net_device *ndev = pcs_to_axienet_local(pcs)->ndev;
1532 struct mdio_device *pcs_phy = pcs_to_axienet_local(pcs)->pcs_phy;
1533 int ret;
1534
1535 ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr,
1536 XLNX_MII_STD_SELECT_REG,
> 1537 iface == PHY_INTERFACE_MODE_SGMII ?
1538 XLNX_MII_STD_SELECT_SGMII : 0);
1539 if (ret < 0) {
1540 netdev_warn(ndev, "Failed to switch PHY interface: %d\n",
1541 ret);
1542 return ret;
1543 }
1544
1545 ret = phylink_mii_c22_pcs_config(pcs_phy, mode, interface, advertising);
1546 if (ret < 0)
1547 netdev_warn(ndev, "Failed to configure PCS: %d\n", ret);
1548
1549 return ret;
1550 }
1551
1552 static const struct phylink_pcs_ops axienet_pcs_ops = {
1553 .pcs_get_state = axienet_pcs_get_state,
> 1554 .pcs_config = axienet_pcs_config,
1555 .pcs_an_restart = axienet_pcs_an_restart,
1556 };
1557
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the linux-arm-kernel
mailing list