[arm:zii 21/54] drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: error: use of undeclared identifier 'eth'

kernel test robot lkp at intel.com
Tue Feb 2 16:55:46 EST 2021


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head:   9a18fc0387f884822571b989c2b4ec0d61392e44
commit: b05600f98c34a3cdcf05c4e625994e1fe2f4032c [21/54] net: mtk_eth_soc: use resolved link config for PCS PHY
config: arm64-randconfig-r002-20210202 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 275c6af7d7f1ed63a03d05b4484413e447133269)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
        git fetch --no-tags arm zii
        git checkout b05600f98c34a3cdcf05c4e625994e1fe2f4032c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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 drivers/net/ethernet/mediatek/mtk_eth_soc.c:21:
   include/linux/phylink.h:77:2: error: type name requires a specifier or qualifier
           DECLARE_PHY_INTERFACE_MASK(supported_interfaces);
           ^
   include/linux/phylink.h:77:29: error: a parameter list without types is only allowed in a function definition
           DECLARE_PHY_INTERFACE_MASK(supported_interfaces);
                                      ^
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:437:27: error: use of undeclared identifier 'eth'
                   int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
                                           ^
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:439:21: error: use of undeclared identifier 'eth'
                   mtk_sgmii_link_up(eth->sgmii, sid, speed, duplex);
                                     ^
   4 errors generated.


vim +/eth +437 drivers/net/ethernet/mediatek/mtk_eth_soc.c

   425	
   426	static void mtk_mac_link_up(struct phylink_config *config,
   427				    struct phy_device *phy,
   428				    unsigned int mode, phy_interface_t interface,
   429				    int speed, int duplex, bool tx_pause, bool rx_pause)
   430	{
   431		struct mtk_mac *mac = container_of(config, struct mtk_mac,
   432						   phylink_config);
   433		u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
   434	
   435		if (phy_interface_mode_is_8023z(interface)) {
   436			/* Decide how GMAC and SGMIISYS be mapped */
 > 437			int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
   438				   0 : mac->id;
   439			mtk_sgmii_link_up(eth->sgmii, sid, speed, duplex);
   440		}
   441	
   442		mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
   443			 MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
   444			 MAC_MCR_FORCE_RX_FC);
   445	
   446		/* Configure speed */
   447		switch (speed) {
   448		case SPEED_2500:
   449		case SPEED_1000:
   450			mcr |= MAC_MCR_SPEED_1000;
   451			break;
   452		case SPEED_100:
   453			mcr |= MAC_MCR_SPEED_100;
   454			break;
   455		}
   456	
   457		/* Configure duplex */
   458		if (duplex == DUPLEX_FULL)
   459			mcr |= MAC_MCR_FORCE_DPX;
   460	
   461		/* Configure pause modes - phylink will avoid these for half duplex */
   462		if (tx_pause)
   463			mcr |= MAC_MCR_FORCE_TX_FC;
   464		if (rx_pause)
   465			mcr |= MAC_MCR_FORCE_RX_FC;
   466	
   467		mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN;
   468		mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
   469	}
   470	

---
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: 33368 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210203/cc45e1ab/attachment-0001.gz>


More information about the linux-arm-kernel mailing list