From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com. [2a00:1450:4864:20::641]) by gmr-mx.google.com with ESMTPS id r12si504635ljm.1.2020.12.13.03.24.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 03:24:09 -0800 (PST) Received: by mail-ej1-x641.google.com with SMTP id q22so864190eja.2 for ; Sun, 13 Dec 2020 03:24:09 -0800 (PST) Return-Path: Subject: Re: [patch 20/30] net/mlx4: Replace irq_to_desc() abuse References: <20201210192536.118432146@linutronix.de> <20201210194044.580936243@linutronix.de> From: Tariq Toukan Message-ID: <01e427f9-7238-d6a8-25ec-8585914d32df@gmail.com> Date: Sun, 13 Dec 2020 13:24:00 +0200 MIME-Version: 1.0 In-Reply-To: <20201210194044.580936243@linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit To: Thomas Gleixner , LKML Cc: Peter Zijlstra , Marc Zyngier , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , afzal mohammed , linux-parisc@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , linux-s390@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Tvrtko Ursulin , Linus Walleij , linux-gpio@vger.kernel.org, Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com, Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , linux-pci@vger.kernel.org, Karthikeyan Mitran , Hou Zhiqiang , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org List-ID: 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 > Cc: Tariq Toukan > Cc: "David S. Miller" > Cc: Jakub Kicinski > 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 Thanks for your patch.