Skip to content

Commit cb39ca9

Browse files
Nitesh Narayan LalKAGA-KOKO
authored andcommitted
enic: Use irq_update_affinity_hint()
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Christian Benvenuti <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fb5bd85 commit cb39ca9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ static void enic_set_affinity_hint(struct enic *enic)
150150
!cpumask_available(enic->msix[i].affinity_mask) ||
151151
cpumask_empty(enic->msix[i].affinity_mask))
152152
continue;
153-
err = irq_set_affinity_hint(enic->msix_entry[i].vector,
154-
enic->msix[i].affinity_mask);
153+
err = irq_update_affinity_hint(enic->msix_entry[i].vector,
154+
enic->msix[i].affinity_mask);
155155
if (err)
156-
netdev_warn(enic->netdev, "irq_set_affinity_hint failed, err %d\n",
156+
netdev_warn(enic->netdev, "irq_update_affinity_hint failed, err %d\n",
157157
err);
158158
}
159159

@@ -173,7 +173,7 @@ static void enic_unset_affinity_hint(struct enic *enic)
173173
int i;
174174

175175
for (i = 0; i < enic->intr_count; i++)
176-
irq_set_affinity_hint(enic->msix_entry[i].vector, NULL);
176+
irq_update_affinity_hint(enic->msix_entry[i].vector, NULL);
177177
}
178178

179179
static int enic_udp_tunnel_set_port(struct net_device *netdev,

0 commit comments

Comments
 (0)