net/mlx4: Replace irq_to_desc() abuse
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Dec 2020 19:25:56 +0000 (20:25 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Dec 2020 15:19:33 +0000 (16:19 +0100)
commit80a62deedf9d449cb65655df39d34b7ef9321d79
treeb9221ca8827be79a16049ee5b9fb5049c4264639
parentb8fecfdfb08dcbabf3d46cfaf7c2fed0e6802ce8
net/mlx4: Replace irq_to_desc() abuse

No driver has any business with the internals of an interrupt
descriptor. Storing a pointer to it just to use yet another helper at the
actual usage site to retrieve the affinity mask is creative at best. Just
because C does not allow encapsulation does not mean that the kernel has no
limits.

Retrieve a pointer to the affinity mask itself and use that. It's still
using an interface which is usually not for random drivers, but definitely
less hideous than the previous hack.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20201210194044.580936243@linutronix.de
drivers/net/ethernet/mellanox/mlx4/en_cq.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h