PCI: Drop is_64bit_address() and is_mask_bit_support() macros
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Apr 2013 23:42:30 +0000 (17:42 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Apr 2013 15:50:30 +0000 (09:50 -0600)
is_64bit_address() and is_mask_bit_support() don't provide any useful
abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/msi.c
drivers/pci/msi.h

index 1688c26db96253df1ef59f784821159b9481631f..aaaf954ad3a4cc9e132c297042869ff1e9c50951 100644 (file)
@@ -555,9 +555,9 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
                return -ENOMEM;
 
        entry->msi_attrib.is_msix       = 0;
-       entry->msi_attrib.is_64         = is_64bit_address(control);
+       entry->msi_attrib.is_64         = !!(control & PCI_MSI_FLAGS_64BIT);
        entry->msi_attrib.entry_nr      = 0;
-       entry->msi_attrib.maskbit       = is_mask_bit_support(control);
+       entry->msi_attrib.maskbit       = !!(control & PCI_MSI_FLAGS_MASKBIT);
        entry->msi_attrib.default_irq   = dev->irq;     /* Save IOAPIC IRQ */
        entry->msi_attrib.pos           = dev->msi_cap;
 
index d2c6cd982a211985ec4e4c84c459d0baae9939c4..bc5cd9969062ce17c1ef760aa268dc38013e8a74 100644 (file)
@@ -8,8 +8,6 @@
 
 #define msi_mask_reg(base, is64bit)    \
        (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
-#define is_64bit_address(control)      (!!(control & PCI_MSI_FLAGS_64BIT))
-#define is_mask_bit_support(control)   (!!(control & PCI_MSI_FLAGS_MASKBIT))
 
 #define msix_table_offset_reg(base)    (base + PCI_MSIX_TABLE)
 #define msix_pba_offset_reg(base)      (base + PCI_MSIX_PBA)