[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209231935.JRvKASjh-lkp@intel.com>
Date: Fri, 23 Sep 2022 19:20:06 +0800
From: kernel test robot <lkp@...el.com>
To: Guangbin Huang <huangguangbin2@...wei.com>, jiri@...lanox.com,
moshe@...lanox.com, davem@...emloft.net, kuba@...nel.org,
idosch@...dia.com
Cc: kbuild-all@...ts.01.org, edumazet@...gle.com, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
huangguangbin2@...wei.com, lipeng321@...wei.com,
chenhao418@...wei.com
Subject: Re: [PATCH net-next 2/2] net: hns3: PF add support setting
parameters of congestion control algorithm by devlink param
Hi Guangbin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Guangbin-Huang/net-hns3-add-support-setting-parameters-of-congestion-control-algorithm-by-devlink-param/20220923-094236
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bcff1a37bafc144d67192f2f5e1f4b9c49b37bd6
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220923/202209231935.JRvKASjh-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/fc0ab8f22c924e963b0e0a2723cbb49acc1d3bb3
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Guangbin-Huang/net-hns3-add-support-setting-parameters-of-congestion-control-algorithm-by-devlink-param/20220923-094236
git checkout fc0ab8f22c924e963b0e0a2723cbb49acc1d3bb3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/
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/hisilicon/hns3/hns3pf/hclge_devlink.c: In function 'hclge_devlink_get_algo_param_value':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c:418:35: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
418 | char *value, *value_tmp, *tmp;
| ^~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c: In function 'hclge_devlink_algo_param_set':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c:690:13: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
690 | int cnt = 0;
| ^~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c: In function 'hclge_devlink_is_algo_param_valid':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c:727:35: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]
727 | char *value, *value_tmp, *tmp;
| ^~~
vim +/tmp +418 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_devlink.c
415
416 static int hclge_devlink_get_algo_param_value(const char *str, u64 *param_value)
417 {
> 418 char *value, *value_tmp, *tmp;
419 int ret = 0;
420 int i;
421
422 value = kmalloc(sizeof(char) * __DEVLINK_PARAM_MAX_STRING_VALUE,
423 GFP_KERNEL);
424 if (!value)
425 return -ENOMEM;
426
427 strncpy(value, str, __DEVLINK_PARAM_MAX_STRING_VALUE);
428 value_tmp = value;
429
430 tmp = strsep(&value, "@");
431
432 for (i = 0; i < strlen(value); i++) {
433 if (!(value[i] >= '0' && value[i] <= '9')) {
434 kfree(value_tmp);
435 return -EINVAL;
436 }
437 }
438
439 ret = kstrtou64(value, 0, param_value);
440
441 kfree(value_tmp);
442 return ret;
443 }
444
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists