diff mbox

[v4,13/22] PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros

Message ID 20130422231140.32621.27788.stgit@bhelgaas-glaptop
State Accepted
Headers show

Commit Message

Bjorn Helgaas April 22, 2013, 11:11 p.m. UTC
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 |    4 ++--
 drivers/pci/msi.h |    2 --
 2 files changed, 2 insertions(+), 4 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index aaaf954..fb07e05 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)
 	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;
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
index bc5cd99..d76c7b2 100644
--- a/drivers/pci/msi.h
+++ b/drivers/pci/msi.h
@@ -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))