]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
authorFushuai Wang <wangfushuai@baidu.com>
Fri, 5 Jun 2026 10:17:56 +0000 (18:17 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 01:57:27 +0000 (18:57 -0700)
Combine cpumask_copy() and cpumask_andnot() into a single
cpumask_andnot() since the function can take cpu_online_mask
directly as the source.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260605101756.91275-1-fushuai.wang@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eq.c

index 22a637111aa2ea57dc95a347738aaeae7a9386c7..d11ec263d53c9de9c93489ed98d3d49650d9a7fb 100644 (file)
@@ -886,8 +886,7 @@ static int comp_irq_request_sf(struct mlx5_core_dev *dev, u16 vecidx)
                return -ENOMEM;
 
        af_desc->is_managed = false;
-       cpumask_copy(&af_desc->mask, cpu_online_mask);
-       cpumask_andnot(&af_desc->mask, &af_desc->mask, &table->used_cpus);
+       cpumask_andnot(&af_desc->mask, cpu_online_mask, &table->used_cpus);
        irq = mlx5_irq_affinity_request(dev, pool, af_desc);
        if (IS_ERR(irq)) {
                kvfree(af_desc);