Patchwork [RFC,v2,07/29] PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1

login
register
mail settings
Submitter Alexander Gordeev
Date Oct. 18, 2013, 5:12 p.m.
Message ID <de85dc2f3aa27ff883504bd30d3f5f929145fe0d.1382103786.git.agordeev@redhat.com>
Download mbox | patch
Permalink /patch/284824/
State Superseded
Headers show

Comments

Alexander Gordeev - Oct. 18, 2013, 5:12 p.m.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Suggested-by: Ben Hutchings <bhutchings@solarflare.com>
---
 include/linux/pci.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Tejun Heo - Nov. 20, 2013, 4:07 p.m.
On Fri, Oct 18, 2013 at 07:12:07PM +0200, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Suggested-by: Ben Hutchings <bhutchings@solarflare.com>

Yes, please.

 Reviewed-by: Tejun Heo <tj@kernel.org>

Thanks.

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index d3a888a..5cfe54c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1148,13 +1148,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)
@@ -1169,7 +1169,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)