Commit 2f221349366daf074bad07cc670e483cc52ab203

Authored by Bjorn Helgaas
1 parent 9925ad0cf1

PCI: Drop msi_data_reg() macro

msi_data_reg() doesn't provide any useful abstraction, so drop it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Showing 2 changed files with 6 additions and 8 deletions Side-by-side Diff

... ... @@ -249,10 +249,10 @@
249 249 if (entry->msi_attrib.is_64) {
250 250 pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
251 251 &msg->address_hi);
252   - pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
  252 + pci_read_config_word(dev, pos + PCI_MSI_DATA_64, &data);
253 253 } else {
254 254 msg->address_hi = 0;
255   - pci_read_config_word(dev, msi_data_reg(pos, 0), &data);
  255 + pci_read_config_word(dev, pos + PCI_MSI_DATA_32, &data);
256 256 }
257 257 msg->data = data;
258 258 }
259 259  
... ... @@ -309,11 +309,11 @@
309 309 if (entry->msi_attrib.is_64) {
310 310 pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI,
311 311 msg->address_hi);
312   - pci_write_config_word(dev, msi_data_reg(pos, 1),
313   - msg->data);
  312 + pci_write_config_word(dev, pos + PCI_MSI_DATA_64,
  313 + msg->data);
314 314 } else {
315   - pci_write_config_word(dev, msi_data_reg(pos, 0),
316   - msg->data);
  315 + pci_write_config_word(dev, pos + PCI_MSI_DATA_32,
  316 + msg->data);
317 317 }
318 318 }
319 319 entry->msg = *msg;
... ... @@ -6,8 +6,6 @@
6 6 #ifndef MSI_H
7 7 #define MSI_H
8 8  
9   -#define msi_data_reg(base, is64bit) \
10   - (base + ((is64bit == 1) ? PCI_MSI_DATA_64 : PCI_MSI_DATA_32))
11 9 #define msi_mask_reg(base, is64bit) \
12 10 (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
13 11 #define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))