Commit 909094c62e21c71c4fd122642512ad05b75fe019
1 parent
4987ce8205
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 2 changed files with 2 additions and 4 deletions Side-by-side Diff
drivers/pci/msi.c
... | ... | @@ -600,8 +600,8 @@ |
600 | 600 | u32 table_offset; |
601 | 601 | u8 bir; |
602 | 602 | |
603 | - pci_read_config_dword(dev, | |
604 | - msix_table_offset_reg(dev->msix_cap), &table_offset); | |
603 | + pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE, | |
604 | + &table_offset); | |
605 | 605 | bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK); |
606 | 606 | table_offset &= ~PCI_MSIX_FLAGS_BIRMASK; |
607 | 607 | phys_addr = pci_resource_start(dev, bir) + table_offset; |
drivers/pci/msi.h
... | ... | @@ -9,8 +9,6 @@ |
9 | 9 | #define msi_mask_reg(base, is64bit) \ |
10 | 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 | 12 | #define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1) |
15 | 13 | #define multi_msix_capable(control) msix_table_size((control)) |
16 | 14 |