From: Ming Lei <ming.lei@redhat.com>
To: kernel test robot <lkp@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>,
kbuild-all@lists.01.org, linux-block@vger.kernel.org,
Yu Kuai <yukuai3@huawei.com>
Subject: Re: [PATCH V2 5/6] blk-mq: prepare for implementing hctx table via xarray
Date: Thu, 3 Mar 2022 17:31:54 +0800 [thread overview]
Message-ID: <YiCLCut1EP6hwdO/@T590> (raw)
In-Reply-To: <202203031651.z0z86F6E-lkp@intel.com>
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_nr_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/archive/20220303/202203031651.z0z86F6E-lkp@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 <lkp@intel.com>
>
> smatch warnings:
> block/blk-mq-sysfs.c:282 __blk_mq_register_dev() warn: always true condition '(--i >= 0) => (0-u32max >= 0)'
> block/blk-mq-sysfs.c:282 __blk_mq_register_dev() warn: always true condition '(--i >= 0) => (0-u32max >= 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 request_queue *q)
return ret;
unreg:
- while (--i >= 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
next prev parent reply other threads:[~2022-03-03 9:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 12:14 [PATCH V2 0/6] blk-mq: update_nr_hw_queues related improvement & bugfix Ming Lei
2022-03-02 12:14 ` [PATCH V2 1/6] blk-mq: figure out correct numa node for hw queue Ming Lei
2022-03-02 12:39 ` John Garry
2022-03-02 12:14 ` [PATCH V2 2/6] blk-mq: simplify reallocation of hw ctxs a bit Ming Lei
2022-03-02 12:14 ` [PATCH V2 3/6] blk-mq: reconfigure poll after queue map is changed Ming Lei
2022-03-03 15:20 ` John Garry
2022-03-02 12:14 ` [PATCH V2 4/6] block: mtip32xx: don't touch q->queue_hw_ctx Ming Lei
2022-03-02 12:14 ` [PATCH V2 5/6] blk-mq: prepare for implementing hctx table via xarray Ming Lei
2022-03-03 9:08 ` kernel test robot
2022-03-03 9:31 ` Ming Lei [this message]
2022-03-02 12:14 ` [PATCH V2 6/6] blk-mq: manage hctx map " Ming Lei
[not found] <202203032010.V1VcXGQT-lkp@intel.com>
2022-03-09 3:01 ` [PATCH V2 5/6] blk-mq: prepare for implementing hctx table " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YiCLCut1EP6hwdO/@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=kbuild-all@lists.01.org \
--cc=linux-block@vger.kernel.org \
--cc=lkp@intel.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox