PCI/MSI: Use __get_cached_msi_msg() instead of get_cached_msi_msg()
authorYijing Wang <wangyijing@huawei.com>
Tue, 23 Sep 2014 05:27:25 +0000 (13:27 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 1 Oct 2014 18:21:23 +0000 (12:21 -0600)
Both callers of get_cached_msi_msg() start with a struct irq_data pointer,
look up the corresponding IRQ number, and pass it to get_cached_msi_msg(),
which then uses irq_get_irq_data() to look up the struct irq_data again to
call __get_cached_msi_msg().

Since we already have the struct irq_data, call __get_cached_msi_msg()
directly and skip the lookup work done by get_cached_msi_msg().

No functional change.

[bhelgaas: changelog]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Tony Luck <tony.luck@intel.com>
CC: linux-ia64@vger.kernel.org
arch/ia64/kernel/msi_ia64.c
arch/ia64/sn/kernel/msi_sn.c

index c430f91..8c3730c 100644 (file)
@@ -23,7 +23,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
        if (irq_prepare_move(irq, cpu))
                return -1;
 
-       get_cached_msi_msg(irq, &msg);
+       __get_cached_msi_msg(idata->msi_desc, &msg);
 
        addr = msg.address_lo;
        addr &= MSI_ADDR_DEST_ID_MASK;
index afc58d2..446e779 100644 (file)
@@ -175,8 +175,8 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
         * Release XIO resources for the old MSI PCI address
         */
 
-       get_cached_msi_msg(irq, &msg);
-        sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
+       __get_cached_msi_msg(data->msi_desc, &msg);
+       sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
        pdev = sn_pdev->pdi_linux_pcidev;
        provider = SN_PCIDEV_BUSPROVIDER(pdev);