Content-Type: multipart/mixed; boundary="===============1046669448807664788==" MIME-Version: 1.0 From: Ming Lei To: kbuild-all@lists.01.org Subject: Re: [PATCH V2 5/6] blk-mq: prepare for implementing hctx table via xarray Date: Thu, 03 Mar 2022 17:31:54 +0800 Message-ID: In-Reply-To: <202203031651.z0z86F6E-lkp@intel.com> List-Id: --===============1046669448807664788== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Mar 03, 2022 at 05:08:47PM +0800, kernel test robot wrote: > Hi Ming, > = > Thank you for the patch! Perhaps something to improve: > = > [auto build test WARNING on axboe-block/for-next] > [also build test WARNING on v5.17-rc6 next-20220302] > [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/Ming-Lei/blk-mq-update_n= r_hw_queues-related-improvement-bugfix/20220302-201636 > base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block= .git for-next > config: m68k-randconfig-m031-20220302 (https://download.01.org/0day-ci/ar= chive/20220303/202203031651.z0z86F6E-lkp(a)intel.com/config) > compiler: m68k-linux-gcc (GCC) 11.2.0 > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > smatch warnings: > block/blk-mq-sysfs.c:282 __blk_mq_register_dev() warn: always true condit= ion '(--i >=3D 0) =3D> (0-u32max >=3D 0)' > block/blk-mq-sysfs.c:282 __blk_mq_register_dev() warn: always true condit= ion '(--i >=3D 0) =3D> (0-u32max >=3D 0)' Good catch, will fix it by the following way in V3: diff --git a/block/blk-mq-sysfs.c b/block/blk-mq-sysfs.c index 6a7fb960e046..851faacc2f78 100644 --- a/block/blk-mq-sysfs.c +++ b/block/blk-mq-sysfs.c @@ -279,8 +279,8 @@ int __blk_mq_register_dev(struct device *dev, struct re= quest_queue *q) return ret; unreg: - while (--i >=3D 0) - blk_mq_unregister_hctx(xa_load(&q->hctx_table, i)); + queue_for_each_hw_ctx(q, hctx, i) { + blk_mq_unregister_hctx(hctx); kobject_uevent(q->mq_kobj, KOBJ_REMOVE); kobject_del(q->mq_kobj); Thanks, Ming --===============1046669448807664788==--