Skip to content

Commit 1ff0308

Browse files
Eli Cohengregkh
authored andcommitted
net/mlx5: Avoid shadowing numa_node
[ Upstream commit d151d73dcc99de87c63bdefebcc4cb69de1cdc40 ] Avoid using a local variable named numa_node to avoid shadowing a public one. Fixes: db058a1 ('net/mlx5_core: Set irq affinity hints') Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 18d971f commit 1ff0308

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,15 +512,14 @@ static int mlx5_irq_set_affinity_hint(struct mlx5_core_dev *mdev, int i)
512512
struct mlx5_priv *priv = &mdev->priv;
513513
struct msix_entry *msix = priv->msix_arr;
514514
int irq = msix[i + MLX5_EQ_VEC_COMP_BASE].vector;
515-
int numa_node = priv->numa_node;
516515
int err;
517516

518517
if (!zalloc_cpumask_var(&priv->irq_info[i].mask, GFP_KERNEL)) {
519518
mlx5_core_warn(mdev, "zalloc_cpumask_var failed");
520519
return -ENOMEM;
521520
}
522521

523-
cpumask_set_cpu(cpumask_local_spread(i, numa_node),
522+
cpumask_set_cpu(cpumask_local_spread(i, priv->numa_node),
524523
priv->irq_info[i].mask);
525524

526525
err = irq_set_affinity_hint(irq, priv->irq_info[i].mask);

0 commit comments

Comments
 (0)