[arm:zii 29/83] drivers/net/ethernet/mediatek/mtk_eth_soc.c:428:27: error: 'eth' undeclared

kernel test robot lkp at intel.com
Sun Jul 12 07:33:10 EDT 2020


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head:   3aa548572ce7d943c33ccb14ea1d5fe4027e2d47
commit: 4e14d82eda5c2b311ae01271d353e8f948468c81 [29/83] net: mtk_eth_soc: use resolved link config for PCS PHY
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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 checkout 4e14d82eda5c2b311ae01271d353e8f948468c81
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):

   drivers/net/ethernet/mediatek/mtk_eth_soc.c:68:5: warning: no previous prototype for 'mtk_m32' [-Wmissing-prototypes]
      68 | u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned reg)
         |     ^~~~~~~
   In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:23:
   drivers/net/ethernet/mediatek/mtk_eth_soc.c: In function 'mtk_mac_link_up':
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:428:27: error: 'eth' undeclared (first use in this function)
     428 |   int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
         |                           ^~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro 'MTK_HAS_CAPS'
     761 | #define MTK_HAS_CAPS(caps, _x)  (((caps) & (_x)) == (_x))
         |                                    ^~~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.c:428:27: note: each undeclared identifier is reported only once for each function it appears in
     428 |   int sid = (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_SGMII)) ?
         |                           ^~~
   drivers/net/ethernet/mediatek/mtk_eth_soc.h:761:36: note: in definition of macro 'MTK_HAS_CAPS'
     761 | #define MTK_HAS_CAPS(caps, _x)  (((caps) & (_x)) == (_x))
         |                                    ^~~~

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

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

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


More information about the linux-arm-kernel mailing list