Skip to contentSkip to conversation

backports: ifdef some pci functions

PATCH In review Emmanuel Grumbach 2 participants 2 messages Mar 3, 2014 – Apr 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backports: ifdef some pci functions

From: Eliad Peller <[email protected]>

struct msix_entry entry is defined only when CONFIG_PCI is defined, resulting in warnings like:

backport-include/linux/pci.h:256:16: warning: 'struct msix_entry' declared inside parameter list [enabled by default] backport-include/linux/pci.h:256:16: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

wrap (also the mock function) with appropriate ifdef CONFIG_PCI.

---
 backport/backport-include/linux/pci.h | 2 ++
 1 file changed, 2 insertions(+)
backport/backport-include/linux/pci.h +2 -0
index 9eeb09b..e438f14 100644
@@ -245,6 +245,7 @@ static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec,
 #endif
 #endif
 
+#ifdef CONFIG_PCI
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
 #define pci_enable_msix_range LINUX_BACKPORT(pci_enable_msix_range)
 #ifdef CONFIG_PCI_MSI
@@ -256,5 +257,6 @@ static inline int pci_enable_msix_range(struct pci_dev *dev,
 { return -ENOSYS; }
 #endif
 #endif
+#endif
 
 #endif /* _BACKPORT_LINUX_PCI_H */
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 5 lines · Emmanuel Grumbach

From: Eliad Peller <[email protected]>

struct msix_entry entry is defined only when CONFIG_PCI is defined, resulting in warnings like:

Quoted 7 lines

backport-include/linux/pci.h:256:16: warning: 'struct msix_entry' declared inside parameter list [enabled by default] backport-include/linux/pci.h:256:16: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

wrap (also the mock function) with appropriate ifdef CONFIG_PCI.

Thanks! Queued it up!

Luis