From: Fushuai Wang Date: Fri, 5 Jun 2026 10:17:56 +0000 (+0800) Subject: net/mlx5: Simplify cpumask operations in comp_irq_request_sf() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32fbe56b3f8a81383bc38d51e76edb74031d34c8;p=thirdparty%2Flinux.git net/mlx5: Simplify cpumask operations in comp_irq_request_sf() 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 Reviewed-by: Shay Drory Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20260605101756.91275-1-fushuai.wang@linux.dev Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 22a637111aa2e..d11ec263d53c9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -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);