[arm:zii 111/186] drivers/net/ethernet/cadence/macb_main.c:736:10: error: returning 'struct phylink_pcs' from a function with incompatible result type 'struct phylink_pcs *'; take the address with &
kernel test robot
lkp at intel.com
Tue Dec 14 20:57:38 PST 2021
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head: d3ebd79d7fb6476e2409c147e4dcc304733f7ae6
commit: 4a3afb218aacb819703cf3336e5c7c83b41b10fb [111/186] net: macb: use .mac_select_pcs() interface
config: x86_64-randconfig-r016-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151224.UQXJMgLg-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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 4a3afb218aacb819703cf3336e5c7c83b41b10fb
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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/cadence/macb_main.c:736:10: error: returning 'struct phylink_pcs' from a function with incompatible result type 'struct phylink_pcs *'; take the address with &
return bp->phylink_sgmii_pcs;
^~~~~~~~~~~~~~~~~~~~~
&
1 error generated.
vim +736 drivers/net/ethernet/cadence/macb_main.c
726
727 static struct phylink_pcs *macb_mac_select_pcs(struct phylink_config *config,
728 phy_interface_t interface)
729 {
730 struct net_device *ndev = to_net_dev(config->dev);
731 struct macb *bp = netdev_priv(ndev);
732
733 if (interface == PHY_INTERFACE_MODE_10GBASER)
734 return &bp->phylink_usx_pcs;
735 else if (interface == PHY_INTERFACE_MODE_SGMII)
> 736 return bp->phylink_sgmii_pcs;
737 else
738 return NULL;
739 }
740
---
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