[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch 20/30] net/mlx4: Replace irq_to_desc() abuse
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: Tariq Toukan <ttoukan.linux@xxxxxxxxx>
- Date: Sun, 13 Dec 2020 13:24:00 +0200
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, afzal mohammed <afzal.mohd.ma@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Mark Rutland <mark.rutland@xxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, linux-s390@xxxxxxxxxxxxxxx, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@xxxxxxxxx>, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>, Wambui Karuga <wambui.karugax@xxxxxxxxx>, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, linux-gpio@xxxxxxxxxxxxxxx, Lee Jones <lee.jones@xxxxxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, linux-ntb@xxxxxxxxxxxxxxxx, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Michal Simek <michal.simek@xxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Karthikeyan Mitran <m.karthikeyan@xxxxxxxxxxxxxx>, Hou Zhiqiang <Zhiqiang.Hou@xxxxxxx>, Saeed Mahameed <saeedm@xxxxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Sun, 13 Dec 2020 12:09:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxxxxx>
Cc: Tariq Toukan <tariqt@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-rdma@xxxxxxxxxxxxxxx
---
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@xxxxxxxxxx>
Thanks for your patch.
|