From: Yijing Wang Date: Tue, 8 Jul 2014 02:08:55 +0000 (+0800) Subject: PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev X-Git-Tag: firefly_0821_release~176^2~3365^2~1^6~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a281b788d6070526c63b7bbc43dcbe5906d3f487;p=firefly-linux-kernel-4.4.55.git PCI/MSI: Retrieve first MSI IRQ from msi_desc rather than pci_dev Retrieve the first MSI IRQ to compute the MSI index from struct msi_desc rather than the struct pci_dev to avoid an additional memory access. Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index dd0a259e3aaa..5bb99213f55d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -235,7 +235,7 @@ static void msi_set_mask_bit(struct irq_data *data, u32 flag) msix_mask_irq(desc, flag); readl(desc->mask_base); /* Flush write to device */ } else { - unsigned offset = data->irq - desc->dev->irq; + unsigned offset = data->irq - desc->irq; msi_mask_irq(desc, 1 << offset, flag << offset); } }