lkml.org 
[lkml]   [2020]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 20/30] net/mlx4: Replace irq_to_desc() abuse
From
Date


On 12/10/2020 9:25 PM, Thomas Gleixner wrote:
> 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>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: netdev@vger.kernel.org
> Cc: linux-rdma@vger.kernel.org
> ---
> drivers/net/ethernet/mellanox/mlx4/en_cq.c | 8 +++-----
> drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +-----
> drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 ++-
> 3 files changed, 6 insertions(+), 11 deletions(-)
>

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks for your patch.

\
 
 \ /
  Last update: 2020-12-13 12:28    [W:0.433 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site