Patchwork [v3,06/11] PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1

login
register
mail settings
Submitter Alexander Gordeev
Date Nov. 26, 2013, 9:09 a.m.
Message ID <2606621e4b4286536eb3592bd03352bcf856ab48.1385399393.git.agordeev@redhat.com>
Download mbox | patch
Permalink /patch/294403/
State Changes Requested
Headers show

Comments

Alexander Gordeev - Nov. 26, 2013, 9:09 a.m.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Suggested-by: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
---
 include/linux/pci.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 835ec7b..d5cc0d3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1157,13 +1157,13 @@  struct msix_entry {
 #ifndef CONFIG_PCI_MSI
 static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec)
 {
-	return -1;
+	return -ENOSYS;
 }
 
 static inline int
 pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec)
 {
-	return -1;
+	return -ENOSYS;
 }
 
 static inline void pci_msi_shutdown(struct pci_dev *dev)
@@ -1178,7 +1178,7 @@  static inline int pci_msix_table_size(struct pci_dev *dev)
 static inline int pci_enable_msix(struct pci_dev *dev,
 				  struct msix_entry *entries, int nvec)
 {
-	return -1;
+	return -ENOSYS;
 }
 
 static inline void pci_msix_shutdown(struct pci_dev *dev)