[arm:zii 42/102] drivers/net/phy/phylink.c:322:9: error: enumeration value 'PHY_INTERFACE_MODE_SMII' not handled in switch

kernel test robot lkp at intel.com
Thu Nov 11 06:37:06 PST 2021


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head:   259f23bb268ce5e8c9dcc5791ca96448a3180a93
commit: 867e7218e10d7c016baaed61855f2e0054a2ae3b [42/102] net: phylink: add generic validate implementation
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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 867e7218e10d7c016baaed61855f2e0054a2ae3b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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/phy/phylink.c: In function 'phylink_get_linkmodes':
>> drivers/net/phy/phylink.c:322:9: error: enumeration value 'PHY_INTERFACE_MODE_SMII' not handled in switch [-Werror=switch]
     322 |         switch (interface) {
         |         ^~~~~~
>> drivers/net/phy/phylink.c:322:9: error: enumeration value 'PHY_INTERFACE_MODE_MOCA' not handled in switch [-Werror=switch]
   cc1: all warnings being treated as errors


vim +/PHY_INTERFACE_MODE_SMII +322 drivers/net/phy/phylink.c

   306	
   307	/**
   308	 * phylink_get_linkmodes() - get acceptable link modes
   309	 * @linkmodes: ethtool linkmode mask (must be already initialised)
   310	 * @interface: phy interface mode defined by &typedef phy_interface_t
   311	 * @mac_capabilities: bitmask of MAC capabilities
   312	 *
   313	 * Set all possible pause, speed and duplex linkmodes in @linkmodes that
   314	 * are supported by the @interface mode and @mac_capabilities. @linkmodes
   315	 * must have been initialised previously.
   316	 */
   317	void phylink_get_linkmodes(unsigned long *linkmodes, phy_interface_t interface,
   318				   unsigned long mac_capabilities)
   319	{
   320		unsigned long caps = MAC_SYM_PAUSE | MAC_ASYM_PAUSE;
   321	
 > 322		switch (interface) {
   323		case PHY_INTERFACE_MODE_USXGMII:
   324			caps |= MAC_10000FD | MAC_5000FD | MAC_2500FD;
   325			fallthrough;
   326	
   327		case PHY_INTERFACE_MODE_RGMII_TXID:
   328		case PHY_INTERFACE_MODE_RGMII_RXID:
   329		case PHY_INTERFACE_MODE_RGMII_ID:
   330		case PHY_INTERFACE_MODE_RGMII:
   331		case PHY_INTERFACE_MODE_QSGMII:
   332		case PHY_INTERFACE_MODE_SGMII:
   333		case PHY_INTERFACE_MODE_GMII:
   334			caps |= MAC_1000HD | MAC_1000FD;
   335			fallthrough;
   336	
   337		case PHY_INTERFACE_MODE_REVRMII:
   338		case PHY_INTERFACE_MODE_RMII:
   339		case PHY_INTERFACE_MODE_REVMII:
   340		case PHY_INTERFACE_MODE_MII:
   341			caps |= MAC_10HD | MAC_10FD;
   342			fallthrough;
   343	
   344		case PHY_INTERFACE_MODE_100BASEX:
   345			caps |= MAC_100HD | MAC_100FD;
   346			break;
   347	
   348		case PHY_INTERFACE_MODE_TBI:
   349		case PHY_INTERFACE_MODE_RTBI:
   350		case PHY_INTERFACE_MODE_1000BASEX:
   351			caps |= MAC_1000HD;
   352			fallthrough;
   353		case PHY_INTERFACE_MODE_TRGMII:
   354			caps |= MAC_1000FD;
   355			break;
   356	
   357		case PHY_INTERFACE_MODE_2500BASEX:
   358			caps |= MAC_2500FD;
   359			break;
   360	
   361		case PHY_INTERFACE_MODE_5GBASER:
   362			caps |= MAC_5000FD;
   363			break;
   364	
   365		case PHY_INTERFACE_MODE_XGMII:
   366		case PHY_INTERFACE_MODE_RXAUI:
   367		case PHY_INTERFACE_MODE_XAUI:
   368		case PHY_INTERFACE_MODE_10GBASER:
   369		case PHY_INTERFACE_MODE_10GKR:
   370			caps |= MAC_10000FD;
   371			break;
   372	
   373		case PHY_INTERFACE_MODE_25GBASER:
   374			caps |= MAC_25000FD;
   375			break;
   376	
   377		case PHY_INTERFACE_MODE_XLGMII:
   378			caps |= MAC_40000FD;
   379			break;
   380	
   381		case PHY_INTERFACE_MODE_INTERNAL:
   382			caps |= ~0;
   383			break;
   384	
   385		case PHY_INTERFACE_MODE_NA:
   386		case PHY_INTERFACE_MODE_MAX:
   387			break;
   388		}
   389	
   390		phylink_caps_to_linkmodes(linkmodes, caps & mac_capabilities);
   391	}
   392	EXPORT_SYMBOL_GPL(phylink_get_linkmodes);
   393	

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


More information about the linux-arm-kernel mailing list