Patchwork [v4,10/22] PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros

login
register
mail settings
Submitter Bjorn Helgaas
Date April 22, 2013, 11:11 p.m.
Message ID <20130422231120.32621.81415.stgit@bhelgaas-glaptop>
Download mbox | patch
Permalink /patch/238684/
State Accepted
Headers show

Comments

Bjorn Helgaas - April 22, 2013, 11:11 p.m.
msi_lower_address_reg() and msi_upper_address_reg() don't provide any
useful abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/msi.c |   16 ++++++++--------
 drivers/pci/msi.h |    2 --
 2 files changed, 8 insertions(+), 10 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

Patch

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index b1a60e0..7011c5d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -244,11 +244,11 @@  void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
 		int pos = dev->msi_cap;
 		u16 data;
 
-		pci_read_config_dword(dev, msi_lower_address_reg(pos),
-					&msg->address_lo);
+		pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_LO,
+				      &msg->address_lo);
 		if (entry->msi_attrib.is_64) {
-			pci_read_config_dword(dev, msi_upper_address_reg(pos),
-						&msg->address_hi);
+			pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
+					      &msg->address_hi);
 			pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
 		} else {
 			msg->address_hi = 0;
@@ -304,11 +304,11 @@  void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
 		msgctl |= entry->msi_attrib.multiple << 4;
 		pci_write_config_word(dev, pos + PCI_MSI_FLAGS, msgctl);
 
-		pci_write_config_dword(dev, msi_lower_address_reg(pos),
-					msg->address_lo);
+		pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_LO,
+				       msg->address_lo);
 		if (entry->msi_attrib.is_64) {
-			pci_write_config_dword(dev, msi_upper_address_reg(pos),
-						msg->address_hi);
+			pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
+					       msg->address_hi);
 			pci_write_config_word(dev, msi_data_reg(pos, 1),
 						msg->data);
 		} else {
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
index 6aa7b19..e5b87d6 100644
--- a/drivers/pci/msi.h
+++ b/drivers/pci/msi.h
@@ -6,8 +6,6 @@ 
 #ifndef MSI_H
 #define MSI_H
 
-#define msi_lower_address_reg(base)	(base + PCI_MSI_ADDRESS_LO)
-#define msi_upper_address_reg(base)	(base + PCI_MSI_ADDRESS_HI)
 #define msi_data_reg(base, is64bit)	\
 	(base + ((is64bit == 1) ? PCI_MSI_DATA_64 : PCI_MSI_DATA_32))
 #define msi_mask_reg(base, is64bit)	\