[rmk-arm:zii 183/199] drivers/net/ethernet/mediatek/mtk_eth_soc.c:378:1: error: non-void function does not return a value

From: kernel test robot
Date: Sat Mar 12 2022 - 12:22:45 EST


tree: git://git.armlinux.org.uk/~rmk/linux-arm zii
head: 22f6fd6865d54d3632278e7f17bad52308e50311
commit: b36d94695f6930a807fb5a6ed3dff972b9ea8c71 [183/199] net: mtk_eth_soc: move MAC_MCR setting to mac_finish()
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220313/202203130106.mIhChrsp-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 43f668b98e8d87290fc6bbf5ed13c3ab542e3497)
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 rmk-arm git://git.armlinux.org.uk/~rmk/linux-arm
git fetch --no-tags rmk-arm zii
git checkout b36d94695f6930a807fb5a6ed3dff972b9ea8c71
# 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=arm64 SHELL=/bin/bash drivers/net/ethernet/mediatek/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:378:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
1 error generated.


vim +378 drivers/net/ethernet/mediatek/mtk_eth_soc.c

361
362 static int mtk_mac_finish(struct phylink_config *config, unsigned int mode,
363 phy_interface_t interface)
364 {
365 struct mtk_mac *mac = container_of(config, struct mtk_mac,
366 phylink_config);
367 u32 mcr_cur, mcr_new;
368
369 /* Setup gmac */
370 mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
371 mcr_new = mcr_cur;
372 mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
373 MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK;
374
375 /* Only update control register when needed! */
376 if (mcr_new != mcr_cur)
377 mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
> 378 }
379

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx