[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209062015.jlZLOfpQ-lkp@intel.com>
Date: Tue, 6 Sep 2022 20:22:40 +0800
From: kernel test robot <lkp@...el.com>
To: Mengyuan Lou <mengyuanlou@...-swift.com>, netdev@...r.kernel.org
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
jiawenwu@...-swift.com, Mengyuan Lou <mengyuanlou@...-swift.com>
Subject: Re: [PATCH net-next 2] net: ngbe: sw init and hw init
Hi Mengyuan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Mengyuan-Lou/net-ngbe-sw-init-and-hw-init/20220905-210027
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6630edabd80823cc6f7c874d52a4cac6381b9051
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220906/202209062015.jlZLOfpQ-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
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
# https://github.com/intel-lab-lkp/linux/commit/683e3287b25349b7844b53577086124b2bdf3cb6
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Mengyuan-Lou/net-ngbe-sw-init-and-hw-init/20220905-210027
git checkout 683e3287b25349b7844b53577086124b2bdf3cb6
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/ethernet/ kernel/power/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/wangxun/ngbe/ngbe_main.c:107:30: warning: result of comparison of constant 16384 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
hw->wol_enabled = (wol_mask == NGBE_WOL_SUP) ? 1 : 0;
~~~~~~~~ ^ ~~~~~~~~~~~~
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c:108:32: warning: result of comparison of constant 32768 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
hw->ncsi_enabled = (ncsi_mask == NGBE_NCSI_MASK ||
~~~~~~~~~ ^ ~~~~~~~~~~~~~~
2 warnings generated.
vim +107 drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
59
60 /**
61 * ngbe_init_type_code - Initialize the shared code
62 * @hw: pointer to hardware structure
63 **/
64 static void ngbe_init_type_code(struct ngbe_hw *hw)
65 {
66 u8 wol_mask = 0, ncsi_mask = 0;
67 u16 type_mask = 0;
68
69 type_mask = (u16)(hw->subsystem_device_id & NGBE_OEM_MASK);
70 ncsi_mask = (u8)(hw->subsystem_device_id & NGBE_NCSI_MASK);
71 wol_mask = (u8)(hw->subsystem_device_id & NGBE_WOL_MASK);
72
73 switch (type_mask) {
74 case NGBE_SUBID_M88E1512_SFP:
75 case NGBE_SUBID_LY_M88E1512_SFP:
76 hw->phy.type = ngbe_phy_m88e1512_sfi;
77 break;
78 case NGBE_SUBID_M88E1512_RJ45:
79 hw->phy.type = ngbe_phy_m88e1512;
80 break;
81 case NGBE_SUBID_M88E1512_MIX:
82 hw->phy.type = ngbe_phy_m88e1512_unknown;
83 break;
84 case NGBE_SUBID_YT8521S_SFP:
85 case NGBE_SUBID_YT8521S_SFP_GPIO:
86 case NGBE_SUBID_LY_YT8521S_SFP:
87 hw->phy.type = ngbe_phy_yt8521s_sfi;
88 break;
89 case NGBE_SUBID_INTERNAL_YT8521S_SFP:
90 case NGBE_SUBID_INTERNAL_YT8521S_SFP_GPIO:
91 hw->phy.type = ngbe_phy_internal_yt8521s_sfi;
92 break;
93 case NGBE_SUBID_RGMII_FPGA:
94 case NGBE_SUBID_OCP_CARD:
95 fallthrough;
96 default:
97 hw->phy.type = ngbe_phy_internal;
98 break;
99 }
100
101 if (hw->phy.type == ngbe_phy_internal ||
102 hw->phy.type == ngbe_phy_internal_yt8521s_sfi)
103 hw->mac.type = ngbe_mac_type_mdi;
104 else
105 hw->mac.type = ngbe_mac_type_rgmii;
106
> 107 hw->wol_enabled = (wol_mask == NGBE_WOL_SUP) ? 1 : 0;
108 hw->ncsi_enabled = (ncsi_mask == NGBE_NCSI_MASK ||
109 type_mask == NGBE_SUBID_OCP_CARD) ? 1 : 0;
110
111 switch (type_mask) {
112 case NGBE_SUBID_LY_YT8521S_SFP:
113 case NGBE_SUBID_LY_M88E1512_SFP:
114 case NGBE_SUBID_YT8521S_SFP_GPIO:
115 case NGBE_SUBID_INTERNAL_YT8521S_SFP_GPIO:
116 hw->gpio_ctrl = 1;
117 break;
118 default:
119 hw->gpio_ctrl = 0;
120 break;
121 }
122 }
123
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists