aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-04-17 19:43:40 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-04-23 11:50:30 -0400
commit909094c62e21c71c4fd122642512ad05b75fe019 (patch)
tree243360c2431db524c2ca3eb00a17431f1244a601
parent4987ce82056327a43cd58c32adf8a3f255e7d862 (diff)
PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
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>
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/pci/msi.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index aaaf954ad3a4..fb07e05a947b 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -600,8 +600,8 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries)
600 u32 table_offset; 600 u32 table_offset;
601 u8 bir; 601 u8 bir;
602 602
603 pci_read_config_dword(dev, 603 pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
604 msix_table_offset_reg(dev->msix_cap), &table_offset); 604 &table_offset);
605 bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); 605 bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
606 table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; 606 table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
607 phys_addr = pci_resource_start(dev, bir) + table_offset; 607 phys_addr = pci_resource_start(dev, bir) + table_offset;
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
index bc5cd9969062..d76c7b2c993c 100644
--- a/drivers/pci/msi.h
+++ b/drivers/pci/msi.h
@@ -9,8 +9,6 @@
9#define msi_mask_reg(base, is64bit) \ 9#define msi_mask_reg(base, is64bit) \
10 (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) 10 (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
11 11
12#define msix_table_offset_reg(base) (base + PCI_MSIX_TABLE)
13#define msix_pba_offset_reg(base) (base + PCI_MSIX_PBA)
14#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) 12#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
15#define multi_msix_capable(control) msix_table_size((control)) 13#define multi_msix_capable(control) msix_table_size((control))
16 14