diff mbox series

[v2,13/14] net/mlx5: Use irq_update_affinity_hint

Message ID 20210629152746.2953364-14-nitesh@redhat.com
State New
Headers show
Series genirq: Cleanup the usage of irq_set_affinity_hint | expand

Commit Message

Nitesh Narayan Lal June 29, 2021, 3:27 p.m. UTC
The driver uses irq_set_affinity_hint() to update the affinity_hint mask
that is consumed by the userspace to distribute the interrupts. However,
under the hood irq_set_affinity_hint() also applies the provided cpumask
(if not NULL) as the affinity for the given interrupt which is an
undocumented side effect.

To remove this side effect irq_set_affinity_hint() has been marked
as deprecated and new interfaces have been introduced. Hence, replace the
irq_set_affinity_hint() with the new interface irq_update_affinity_hint()
that only updates the affinity_hint pointer.

Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index c3373fb1cd7f..a1b9434f4e25 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -276,8 +276,8 @@  static int set_comp_irq_affinity_hint(struct mlx5_core_dev *mdev, int i)
 	cpumask_set_cpu(cpumask_local_spread(i, mdev->priv.numa_node),
 			irq->mask);
 	if (IS_ENABLED(CONFIG_SMP) &&
-	    irq_set_affinity_hint(irqn, irq->mask))
-		mlx5_core_warn(mdev, "irq_set_affinity_hint failed, irq 0x%.4x",
+	    irq_update_affinity_hint(irqn, irq->mask))
+		mlx5_core_warn(mdev, "irq_update_affinity_hint failed, irq 0x%.4x",
 			       irqn);
 
 	return 0;
@@ -291,7 +291,7 @@  static void clear_comp_irq_affinity_hint(struct mlx5_core_dev *mdev, int i)
 
 	irq = mlx5_irq_get(mdev, vecidx);
 	irqn = pci_irq_vector(mdev->pdev, vecidx);
-	irq_set_affinity_hint(irqn, NULL);
+	irq_update_affinity_hint(irqn, NULL);
 	free_cpumask_var(irq->mask);
 }