]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Apr 2013 23:43:40 +0000 (17:43 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Apr 2013 15:50:30 +0000 (09:50 -0600)
msix_table_offset_reg() is used only once and adds a useless indirection,
so just use the table offset directly.

msix_pba_offset_reg() is unused, so just delete it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/msi.c
drivers/pci/msi.h

index aaaf954ad3a4cc9e132c297042869ff1e9c50951..fb07e05a947b71e4ead9181e40ec08658a8dfdab 100644 (file)
@@ -600,8 +600,8 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries)
        u32 table_offset;
        u8 bir;
 
-       pci_read_config_dword(dev,
-               msix_table_offset_reg(dev->msix_cap), &table_offset);
+       pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
+                             &table_offset);
        bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
        table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
        phys_addr = pci_resource_start(dev, bir) + table_offset;
index bc5cd9969062ce17c1ef760aa268dc38013e8a74..d76c7b2c993cabf1a2d7b1847db7f9e7200d4b05 100644 (file)
@@ -9,8 +9,6 @@
 #define msi_mask_reg(base, is64bit)    \
        (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
 
-#define msix_table_offset_reg(base)    (base + PCI_MSIX_TABLE)
-#define msix_pba_offset_reg(base)      (base + PCI_MSIX_PBA)
 #define msix_table_size(control)       ((control & PCI_MSIX_FLAGS_QSIZE)+1)
 #define multi_msix_capable(control)    msix_table_size((control))