PCI AER: fix warnings when PCIEAER=n
authorRandy Dunlap <randy.dunlap@oracle.com>
Thu, 23 Aug 2007 17:37:53 +0000 (10:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 Sep 2007 11:22:16 +0000 (04:22 -0700)
Fix warnings when CONFIG_PCIEAER=n:

drivers/pci/pcie/portdrv_pci.c:105: warning: statement with no effect
drivers/pci/pcie/portdrv_pci.c:226: warning: statement with no effect
drivers/scsi/arcmsr/arcmsr_hba.c:352: warning: statement with no effect

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/aer.h

index 509656286e5326e3f10617bea575ad56f5128602..bcf236d825e8ca1e3a2b59f84aa3903fba375630 100644 (file)
@@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
 extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
 extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev);
 #else
-#define pci_enable_pcie_error_reporting(dev)           (-EINVAL)
-#define pci_find_aer_capability(dev)                   (0)
-#define pci_disable_pcie_error_reporting(dev)          (-EINVAL)
-#define pci_cleanup_aer_uncorrect_error_status(dev)    (-EINVAL)
-#define pci_cleanup_aer_correct_error_status(dev)      (-EINVAL)
+static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev)
+{
+       return -EINVAL;
+}
+static inline int pci_find_aer_capability(struct pci_dev *dev)
+{
+       return 0;
+}
+static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev)
+{
+       return -EINVAL;
+}
+static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
+{
+       return -EINVAL;
+}
+static inline int pci_cleanup_aer_correct_error_status(struct pci_dev *dev)
+{
+       return -EINVAL;
+}
 #endif
 
 #endif //_AER_H_