public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI AER: fix warnings when PCIEAER=n
@ 2007-08-23 17:37 Randy Dunlap
  2007-08-23 18:44 ` Linas Vepstas
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2007-08-23 17:37 UTC (permalink / raw)
  To: lkml, linux-pci; +Cc: linas, gregkh, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

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>
---
 include/linux/aer.h |   25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

--- linux-2623-rc3-kex.orig/include/linux/aer.h
+++ linux-2623-rc3-kex/include/linux/aer.h
@@ -15,11 +15,26 @@ extern int pci_disable_pcie_error_report
 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_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-23 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23 17:37 [PATCH] PCI AER: fix warnings when PCIEAER=n Randy Dunlap
2007-08-23 18:44 ` Linas Vepstas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox