Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Yijing Wang <wangyijing@xxxxxxxxxx>
- Subject: Re: [PATCH v2 03/22] MSI: Remove the redundant irq_set_chip_data()
- From: Thierry Reding <thierry.reding@xxxxxxxxx>
- Date: Fri, 26 Sep 2014 10:09:49 +0200
- Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Xinwei Hu <huxinwei@xxxxxxxxxx>, Wuyun <wuyun.wu@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx, arnab.basu@xxxxxxxxxxxxx, Bharat.Bhushan@xxxxxxxxxxxxx, x86@xxxxxxxxxx, Arnd Bergmann <arnd@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Joerg Roedel <joro@xxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Chris Metcalf <cmetcalf@xxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>, Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
- In-reply-to: <1411614872-4009-4-git-send-email-wangyijing@huawei.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1411614872-4009-1-git-send-email-wangyijing@huawei.com> <1411614872-4009-4-git-send-email-wangyijing@huawei.com>
- User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote:
> 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 <wangyijing@xxxxxxxxxx>
> ---
> drivers/pci/msi.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Thierry Reding <treding@xxxxxxxxxx>
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index 51d7e62..50f67a3 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -41,14 +41,13 @@ 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;
> }
>
> void __weak arch_teardown_msi_irq(unsigned int irq)
> {
> - struct msi_chip *chip = irq_get_chip_data(irq);
> + struct msi_desc *entry = irq_get_msi_desc(irq);
> + struct msi_chip *chip = entry->dev->bus->msi;
>
> if (!chip || !chip->teardown_irq)
> return;
> --
> 1.7.1
>
Attachment:
pgpFXk2Rcuulz.pgp
Description: PGP signature
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]