From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Stach Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() Date: Mon, 15 Sep 2014 16:00:48 +0200 Message-ID: <1410789648.3314.5.camel@pengutronix.de> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-4-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:41266 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753086AbaIOOCd (ORCPT ); Mon, 15 Sep 2014 10:02:33 -0400 In-Reply-To: <1409911806-10519-4-git-send-email-wangyijing@huawei.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yijing Wang Cc: Bjorn Helgaas , Xinwei Hu , Wuyun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. > > Signed-off-by: Yijing Wang > --- > drivers/pci/msi.c | 2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index f6cb317..d547f7f 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -41,8 +41,6 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > if (err < 0) > return err; > > - irq_set_chip_data(desc->irq, chip); > - > return 0; > } > arch_teardown_msi_irq() expects to find the msi_chip in the irq chip_data field. As this means drivers don't have any reasonable other possibility to stuff things into this field, I think it would make sense to do the cleanup the other way around: keep the irq_set_chip_data arch_setup_msi_irq() and rip it out of the individual drivers. Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from metis.ext.pengutronix.de ([92.198.50.35]:41266 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753086AbaIOOCd (ORCPT ); Mon, 15 Sep 2014 10:02:33 -0400 Message-ID: <1410789648.3314.5.camel@pengutronix.de> Subject: Re: [PATCH v1 03/21] MSI: Remove the redundant irq_set_chip_data() From: Lucas Stach Date: Mon, 15 Sep 2014 16:00:48 +0200 In-Reply-To: <1409911806-10519-4-git-send-email-wangyijing@huawei.com> References: <1409911806-10519-1-git-send-email-wangyijing@huawei.com> <1409911806-10519-4-git-send-email-wangyijing@huawei.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yijing Wang Cc: Bjorn Helgaas , Xinwei Hu , Wuyun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , linux-arch@vger.kernel.org, arnab.basu@freescale.com, Bharat.Bhushan@freescale.com, x86@kernel.org, Arnd Bergmann , Thomas Gleixner , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-mips@linux-mips.org, Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Sebastian Ott , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Chris Metcalf , Ralf Baechle Message-ID: <20140915140048.2IXhFuX_d29shRJSE4-I8L9JzwgAInHSb0CJYeuxls4@z> Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang: > Currently, pcie-designware, pcie-rcar, pci-tegra drivers > use irq chip_data to save the msi_chip pointer. They > already call irq_set_chip_data() in their own MSI irq map > functions. So irq_set_chip_data() in arch_setup_msi_irq() > is useless. > > Signed-off-by: Yijing Wang > --- > drivers/pci/msi.c | 2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c > index f6cb317..d547f7f 100644 > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -41,8 +41,6 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) > if (err < 0) > return err; > > - irq_set_chip_data(desc->irq, chip); > - > return 0; > } > arch_teardown_msi_irq() expects to find the msi_chip in the irq chip_data field. As this means drivers don't have any reasonable other possibility to stuff things into this field, I think it would make sense to do the cleanup the other way around: keep the irq_set_chip_data arch_setup_msi_irq() and rip it out of the individual drivers. Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |