[arm:zii 111/186] drivers/net/ethernet/cadence/macb_main.c:736:26: error: incompatible types when returning type 'struct phylink_pcs' but 'struct phylink_pcs *' was expected
kernel test robot
lkp at intel.com
Tue Dec 14 18:23:47 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: microblaze-randconfig-r013-20211214 (https://download.01.org/0day-ci/archive/20211215/202112151024.Zg0UOSvY-lkp@intel.com/config)
compiler: microblaze-linux-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 4a3afb218aacb819703cf3336e5c7c83b41b10fb
# 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=microblaze 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/ethernet/cadence/macb_main.c: In function 'macb_mac_select_pcs':
>> drivers/net/ethernet/cadence/macb_main.c:736:26: error: incompatible types when returning type 'struct phylink_pcs' but 'struct phylink_pcs *' was expected
736 | return bp->phylink_sgmii_pcs;
| ~~^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/cadence/macb_main.c:739:1: error: control reaches end of non-void function [-Werror=return-type]
739 | }
| ^
cc1: some warnings being treated as errors
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