tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b318937609077b966b3bd130583ee3aaaa4d015a commit: 206f9c11a8c8b0197da5a26859d96d2ed65f5757 [18554/21854] net: ngbe: Add Netswift Giga NIC driver config: x86_64-buildonly-randconfig-006-20240313 (https://download.01.org/0day-ci/archive/20240314/202403140713.UrAXxk6G-lkp@i...) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240314/202403140713.UrAXxk6G-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202403140713.UrAXxk6G-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/netswift/ngbe/ngbe_param.c:23: In file included from drivers/net/ethernet/netswift/ngbe/ngbe.h:22: In file included from include/net/ip.h:32: In file included from include/net/route.h:31: include/net/ip_fib.h:417:10: warning: array index 0 is past the end of the array (that has type 'struct fib_nh[0]') [-Warray-bounds] 417 | *itag = FIB_RES_NH(*res).nh_tclassid<<16; | ^~~~~~~~~~~~~~~~ include/net/ip_fib.h:167:27: note: expanded from macro 'FIB_RES_NH' 167 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) | ^ ~ include/net/ip_fib.h:127:2: note: array 'fib_nh' declared here 127 | struct fib_nh fib_nh[0]; | ^ In file included from drivers/net/ethernet/netswift/ngbe/ngbe_param.c:23: drivers/net/ethernet/netswift/ngbe/ngbe.h:764:6: warning: variable 'cur_diff' set but not used [-Wunused-but-set-variable] 764 | u32 cur_diff = 0; | ^ 2 warnings generated.
drivers/net/ethernet/netswift/ngbe/ngbe_param.o: warning: objtool: missing symbol for section .text
-- In file included from drivers/net/ethernet/netswift/ngbe/ngbe_sriov.c:30: In file included from drivers/net/ethernet/netswift/ngbe/ngbe.h:22: In file included from include/net/ip.h:32: In file included from include/net/route.h:31: include/net/ip_fib.h:417:10: warning: array index 0 is past the end of the array (that has type 'struct fib_nh[0]') [-Warray-bounds] 417 | *itag = FIB_RES_NH(*res).nh_tclassid<<16; | ^~~~~~~~~~~~~~~~ include/net/ip_fib.h:167:27: note: expanded from macro 'FIB_RES_NH' 167 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) | ^ ~ include/net/ip_fib.h:127:2: note: array 'fib_nh' declared here 127 | struct fib_nh fib_nh[0]; | ^ In file included from drivers/net/ethernet/netswift/ngbe/ngbe_sriov.c:30: drivers/net/ethernet/netswift/ngbe/ngbe.h:764:6: warning: variable 'cur_diff' set but not used [-Wunused-but-set-variable] 764 | u32 cur_diff = 0; | ^ 2 warnings generated.
drivers/net/ethernet/netswift/ngbe/ngbe_sriov.o: warning: objtool: missing symbol for section .text
-- | = 0 drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1054:12: warning: variable 'value' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] 1054 | status = TCALL(hw, phy.ops.read_reg_mdi, 4, 0, &value); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1055:22: note: uninitialized use occurs here 1055 | *pause_bit = (u8)((value >> 10) & 0x3); | ^~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1054:12: note: remove the '?:' if its condition is always true 1054 | status = TCALL(hw, phy.ops.read_reg_mdi, 4, 0, &value); | ^ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1049:11: note: initialize the variable 'value' to silence this warning 1049 | u16 value; | ^ | = 0 drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1074:5: warning: no previous prototype for function 'ngbe_phy_get_lp_advertised_pause' [-Wmissing-prototypes] 1074 | s32 ngbe_phy_get_lp_advertised_pause(struct ngbe_hw *hw, u8 *pause_bit) | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1074:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1074 | s32 ngbe_phy_get_lp_advertised_pause(struct ngbe_hw *hw, u8 *pause_bit) | ^ | static drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1098:12: warning: variable 'value' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] 1098 | status = TCALL(hw, phy.ops.read_reg_mdi, 5, 0, &value); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1099:22: note: uninitialized use occurs here 1099 | *pause_bit = (u8)((value >> 10) & 0x3); | ^~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1098:12: note: remove the '?:' if its condition is always true 1098 | status = TCALL(hw, phy.ops.read_reg_mdi, 5, 0, &value); | ^ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1093:11: note: initialize the variable 'value' to silence this warning 1093 | u16 value; | ^ | = 0 drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1119:5: warning: no previous prototype for function 'ngbe_phy_set_pause_advertisement' [-Wmissing-prototypes] 1119 | s32 ngbe_phy_set_pause_advertisement(struct ngbe_hw *hw, u16 pause_bit) | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1119:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1119 | s32 ngbe_phy_set_pause_advertisement(struct ngbe_hw *hw, u16 pause_bit) | ^ | static drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1124:11: warning: variable 'value' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] 1124 | status = TCALL(hw, phy.ops.read_reg, 4, 0, &value); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1125:2: note: uninitialized use occurs here 1125 | value &= ~0xC00; | ^~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1124:11: note: remove the '?:' if its condition is always true 1124 | status = TCALL(hw, phy.ops.read_reg, 4, 0, &value); | ^ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1121:11: note: initialize the variable 'value' to silence this warning 1121 | u16 value; | ^ | = 0 drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1138:12: warning: variable 'value' is used uninitialized whenever '?:' condition is false [-Wsometimes-uninitialized] 1138 | status = TCALL(hw, phy.ops.read_reg_mdi, 4, 0, &value); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1139:3: note: uninitialized use occurs here 1139 | value &= ~0xC00; | ^~~~~ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1138:12: note: remove the '?:' if its condition is always true 1138 | status = TCALL(hw, phy.ops.read_reg_mdi, 4, 0, &value); | ^ drivers/net/ethernet/netswift/ngbe/ngbe_type.h:2761:35: note: expanded from macro 'TCALL' 2761 | #define TCALL(hw, func, args...) (((hw)->func != NULL) \ | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1134:11: note: initialize the variable 'value' to silence this warning 1134 | u16 value; | ^ | = 0 drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1167:5: warning: no previous prototype for function 'ngbe_phy_setup' [-Wmissing-prototypes] 1167 | s32 ngbe_phy_setup(struct ngbe_hw *hw) | ^ drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:1167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1167 | s32 ngbe_phy_setup(struct ngbe_hw *hw) | ^ | static 19 warnings generated. drivers/net/ethernet/netswift/ngbe/ngbe_phy.c:123: warning: Function parameter or member 'device_type' not described in 'ngbe_phy_read_reg_mdi'
drivers/net/ethernet/netswift/ngbe/ngbe_phy.o: warning: objtool: missing symbol for section .text