diff options
| author | Fushuai Wang <wangfushuai@baidu.com> | 2026-06-05 18:17:56 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-08 18:57:27 -0700 |
| commit | 32fbe56b3f8a81383bc38d51e76edb74031d34c8 (patch) | |
| tree | 7836f60ea8cbd217ade14c1683380bfe2b915685 | |
| parent | 7c5d41f87f079990bf241359e3c1332d8d10fe87 (diff) | |
| download | linux-stable-32fbe56b3f8a81383bc38d51e76edb74031d34c8.tar.gz linux-stable-32fbe56b3f8a81383bc38d51e76edb74031d34c8.zip | |
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 <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>
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 22a637111aa2..d11ec263d53c 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); |
