Message ID | 1611578284-42974-1-git-send-email-zou_wei@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] net/mlx5: Remove unused including <linux/version.h> | expand |
Hi Zou, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210125] url: https://github.com/0day-ci/linux/commits/Zou-Wei/net-mlx5-Remove-unused-including-linux-version-h/20210126-140754 base: 59fa6a163ffabc1bf25c5e0e33899e268a96d3cc config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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 # https://github.com/0day-ci/linux/commit/1dec86e94b8b2aa2fbc189db84d1c5e5e570fb64 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Zou-Wei/net-mlx5-Remove-unused-including-linux-version-h/20210126-140754 git checkout 1dec86e94b8b2aa2fbc189db84d1c5e5e570fb64 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): drivers/net/ethernet/mellanox/mlx5/core/main.c: In function 'mlx5_set_driver_version': >> drivers/net/ethernet/mellanox/mlx5/core/main.c:237:8: error: 'LINUX_VERSION_MAJOR' undeclared (first use in this function); did you mean 'TLS_VERSION_MAJOR'? 237 | (u8)(LINUX_VERSION_MAJOR), (u8)(LINUX_VERSION_PATCHLEVEL), | ^~~~~~~~~~~~~~~~~~~ | TLS_VERSION_MAJOR drivers/net/ethernet/mellanox/mlx5/core/main.c:237:8: note: each undeclared identifier is reported only once for each function it appears in >> drivers/net/ethernet/mellanox/mlx5/core/main.c:237:35: error: 'LINUX_VERSION_PATCHLEVEL' undeclared (first use in this function) 237 | (u8)(LINUX_VERSION_MAJOR), (u8)(LINUX_VERSION_PATCHLEVEL), | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mellanox/mlx5/core/main.c:238:9: error: 'LINUX_VERSION_SUBLEVEL' undeclared (first use in this function) 238 | (u16)(LINUX_VERSION_SUBLEVEL)); | ^~~~~~~~~~~~~~~~~~~~~~ vim +237 drivers/net/ethernet/mellanox/mlx5/core/main.c e3297246c2c8cf Eli Cohen 2015-10-14 209 012e50e109fd27 Huy Nguyen 2016-11-17 210 static void mlx5_set_driver_version(struct mlx5_core_dev *dev) 012e50e109fd27 Huy Nguyen 2016-11-17 211 { 012e50e109fd27 Huy Nguyen 2016-11-17 212 int driver_ver_sz = MLX5_FLD_SZ_BYTES(set_driver_version_in, 012e50e109fd27 Huy Nguyen 2016-11-17 213 driver_version); 3ac0e69e69ad17 Leon Romanovsky 2020-04-09 214 u8 in[MLX5_ST_SZ_BYTES(set_driver_version_in)] = {}; 012e50e109fd27 Huy Nguyen 2016-11-17 215 int remaining_size = driver_ver_sz; 012e50e109fd27 Huy Nguyen 2016-11-17 216 char *string; 012e50e109fd27 Huy Nguyen 2016-11-17 217 012e50e109fd27 Huy Nguyen 2016-11-17 218 if (!MLX5_CAP_GEN(dev, driver_version)) 012e50e109fd27 Huy Nguyen 2016-11-17 219 return; 012e50e109fd27 Huy Nguyen 2016-11-17 220 012e50e109fd27 Huy Nguyen 2016-11-17 221 string = MLX5_ADDR_OF(set_driver_version_in, in, driver_version); 012e50e109fd27 Huy Nguyen 2016-11-17 222 012e50e109fd27 Huy Nguyen 2016-11-17 223 strncpy(string, "Linux", remaining_size); 012e50e109fd27 Huy Nguyen 2016-11-17 224 012e50e109fd27 Huy Nguyen 2016-11-17 225 remaining_size = max_t(int, 0, driver_ver_sz - strlen(string)); 012e50e109fd27 Huy Nguyen 2016-11-17 226 strncat(string, ",", remaining_size); 012e50e109fd27 Huy Nguyen 2016-11-17 227 012e50e109fd27 Huy Nguyen 2016-11-17 228 remaining_size = max_t(int, 0, driver_ver_sz - strlen(string)); 17a7612b99e66d Leon Romanovsky 2020-10-04 229 strncat(string, KBUILD_MODNAME, remaining_size); 012e50e109fd27 Huy Nguyen 2016-11-17 230 012e50e109fd27 Huy Nguyen 2016-11-17 231 remaining_size = max_t(int, 0, driver_ver_sz - strlen(string)); 012e50e109fd27 Huy Nguyen 2016-11-17 232 strncat(string, ",", remaining_size); 012e50e109fd27 Huy Nguyen 2016-11-17 233 012e50e109fd27 Huy Nguyen 2016-11-17 234 remaining_size = max_t(int, 0, driver_ver_sz - strlen(string)); 907af0f0cab4ee Leon Romanovsky 2020-10-15 235 907af0f0cab4ee Leon Romanovsky 2020-10-15 236 snprintf(string + strlen(string), remaining_size, "%u.%u.%u", 537896fabed11f Sasha Levin 2021-01-18 @237 (u8)(LINUX_VERSION_MAJOR), (u8)(LINUX_VERSION_PATCHLEVEL), 537896fabed11f Sasha Levin 2021-01-18 @238 (u16)(LINUX_VERSION_SUBLEVEL)); 012e50e109fd27 Huy Nguyen 2016-11-17 239 012e50e109fd27 Huy Nguyen 2016-11-17 240 /*Send the command*/ 012e50e109fd27 Huy Nguyen 2016-11-17 241 MLX5_SET(set_driver_version_in, in, opcode, 012e50e109fd27 Huy Nguyen 2016-11-17 242 MLX5_CMD_OP_SET_DRIVER_VERSION); 012e50e109fd27 Huy Nguyen 2016-11-17 243 3ac0e69e69ad17 Leon Romanovsky 2020-04-09 244 mlx5_cmd_exec_in(dev, set_driver_version, in); 012e50e109fd27 Huy Nguyen 2016-11-17 245 } 012e50e109fd27 Huy Nguyen 2016-11-17 246 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 5c52021..50999da 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -50,7 +50,6 @@ #ifdef CONFIG_RFS_ACCEL #include <linux/cpu_rmap.h> #endif -#include <linux/version.h> #include <net/devlink.h> #include "mlx5_core.h" #include "lib/eq.h"
Fix the following versioncheck warning: drivers/net/ethernet/mellanox/mlx5/core/main.c:53:1: unused including <linux/version.h> Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 - 1 file changed, 1 deletion(-)