From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com. [2a00:1450:4864:20::642]) by gmr-mx.google.com with ESMTPS id z188si45547wmc.1.2020.12.13.03.34.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Dec 2020 03:34:08 -0800 (PST) Received: by mail-ej1-x642.google.com with SMTP id jx16so18594132ejb.10 for ; Sun, 13 Dec 2020 03:34:08 -0800 (PST) Return-Path: Subject: Re: [patch 22/30] net/mlx5: Replace irq_to_desc() abuse References: <20201210192536.118432146@linutronix.de> <20201210194044.769458162@linutronix.de> From: Tariq Toukan Message-ID: <02be0e10-f2b5-7cbb-3271-4d872616ffd4@gmail.com> Date: Sun, 13 Dec 2020 13:34:01 +0200 MIME-Version: 1.0 In-Reply-To: <20201210194044.769458162@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 , "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 , Tariq Toukan , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, 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 > --- > drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- > drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- > drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 6 +----- > 3 files changed, 3 insertions(+), 7 deletions(-) > Reviewed-by: Tariq Toukan Thanks.