diff options
author | Yury Norov <yury.norov@gmail.com> | 2021-08-14 23:17:05 +0200 |
---|---|---|
committer | Yury Norov <yury.norov@gmail.com> | 2022-01-15 17:47:31 +0100 |
commit | 9b51d9d866482a703646fd4c07e433c3d9d88efd (patch) | |
tree | 848b62fea613d49466544ae6e441ddac0478ff34 /block | |
parent | tools: sync tools/bitmap with mother linux (diff) | |
download | linux-9b51d9d866482a703646fd4c07e433c3d9d88efd.tar.xz linux-9b51d9d866482a703646fd4c07e433c3d9d88efd.zip |
cpumask: replace cpumask_next_* with cpumask_first_* where appropriate
cpumask_first() is a more effective analogue of 'next' version if n == -1
(which means start == 0). This patch replaces 'next' with 'first' where
things look trivial.
There's no cpumask_first_zero() function, so create it.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 8874a63ae952..ef56e753ab38 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2967,7 +2967,7 @@ static bool blk_mq_hctx_has_requests(struct blk_mq_hw_ctx *hctx) static inline bool blk_mq_last_cpu_in_hctx(unsigned int cpu, struct blk_mq_hw_ctx *hctx) { - if (cpumask_next_and(-1, hctx->cpumask, cpu_online_mask) != cpu) + if (cpumask_first_and(hctx->cpumask, cpu_online_mask) != cpu) return false; if (cpumask_next_and(cpu, hctx->cpumask, cpu_online_mask) < nr_cpu_ids) return false; |