Content-Type: multipart/mixed; boundary="===============8557098029340004183==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC V3 4/6] blk-iocost: make iocost pluggable Date: Thu, 17 Feb 2022 00:10:43 +0800 Message-ID: <202202162343.zPf2UuRg-lkp@intel.com> In-Reply-To: <20220216114809.84551-5-jianchao.wan9@gmail.com> List-Id: --===============8557098029340004183== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi "Wang, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on v5.17-rc4] [cannot apply to axboe-block/for-next next-20220216] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Wang-Jianchao-Kuaishou/blk= -make-blk-rq-qos-policies-pluggable-and-modular/20220216-195026 base: 754e0b0e35608ed5206d6a67a791563c631cec07 config: riscv-buildonly-randconfig-r004-20220216 (https://download.01.org/0= day-ci/archive/20220216/202202162343.zPf2UuRg-lkp(a)intel.com/config) compiler: riscv32-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/28800cf3765b9c31df59c6665= 40b777f278f03e5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Wang-Jianchao-Kuaishou/blk-make-bl= k-rq-qos-policies-pluggable-and-modular/20220216-195026 git checkout 28800cf3765b9c31df59c666540b777f278f03e5 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): block/blk-iocost.c: In function 'iocg_activate': block/blk-iocost.c:1245:13: warning: variable 'last_period' set but not = used [-Wunused-but-set-variable] 1245 | u64 last_period, cur_period; | ^~~~~~~~~~~ block/blk-iocost.c: In function 'ioc_cost_model_write': >> block/blk-iocost.c:3333:24: warning: variable 'rqos' set but not used [-= Wunused-but-set-variable] 3333 | struct rq_qos *rqos; | ^~~~ vim +/rqos +3333 block/blk-iocost.c 3328 = 3329 static ssize_t ioc_cost_model_write(struct kernfs_open_file *of, cha= r *input, 3330 size_t nbytes, loff_t off) 3331 { 3332 struct block_device *bdev; > 3333 struct rq_qos *rqos; 3334 struct ioc *ioc; 3335 u64 u[NR_I_LCOEFS]; 3336 bool user; 3337 char *p; 3338 int ret; 3339 = 3340 bdev =3D blkcg_conf_open_bdev(&input); 3341 if (IS_ERR(bdev)) 3342 return PTR_ERR(bdev); 3343 = 3344 rqos =3D rq_qos_get(bdev_get_queue(bdev), ioc_rqos_ops.id); 3345 if (!ioc) { 3346 ret =3D -EOPNOTSUPP; 3347 goto err; 3348 } 3349 = 3350 spin_lock_irq(&ioc->lock); 3351 memcpy(u, ioc->params.i_lcoefs, sizeof(u)); 3352 user =3D ioc->user_cost_model; 3353 spin_unlock_irq(&ioc->lock); 3354 = 3355 while ((p =3D strsep(&input, " \t\n"))) { 3356 substring_t args[MAX_OPT_ARGS]; 3357 char buf[32]; 3358 int tok; 3359 u64 v; 3360 = 3361 if (!*p) 3362 continue; 3363 = 3364 switch (match_token(p, cost_ctrl_tokens, args)) { 3365 case COST_CTRL: 3366 match_strlcpy(buf, &args[0], sizeof(buf)); 3367 if (!strcmp(buf, "auto")) 3368 user =3D false; 3369 else if (!strcmp(buf, "user")) 3370 user =3D true; 3371 else 3372 goto einval; 3373 continue; 3374 case COST_MODEL: 3375 match_strlcpy(buf, &args[0], sizeof(buf)); 3376 if (strcmp(buf, "linear")) 3377 goto einval; 3378 continue; 3379 } 3380 = 3381 tok =3D match_token(p, i_lcoef_tokens, args); 3382 if (tok =3D=3D NR_I_LCOEFS) 3383 goto einval; 3384 if (match_u64(&args[0], &v)) 3385 goto einval; 3386 u[tok] =3D v; 3387 user =3D true; 3388 } 3389 = 3390 spin_lock_irq(&ioc->lock); 3391 if (user) { 3392 memcpy(ioc->params.i_lcoefs, u, sizeof(u)); 3393 ioc->user_cost_model =3D true; 3394 } else { 3395 ioc->user_cost_model =3D false; 3396 } 3397 ioc_refresh_params(ioc, true); 3398 spin_unlock_irq(&ioc->lock); 3399 = 3400 blkdev_put_no_open(bdev); 3401 return nbytes; 3402 = 3403 einval: 3404 ret =3D -EINVAL; 3405 err: 3406 blkdev_put_no_open(bdev); 3407 return ret; 3408 } 3409 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8557098029340004183==--