Skip to contentSkip to conversation

x86/pci: Add missing forward declaration for pci_numachip_init()

PATCH Applied Krzysztof Wilczyński 2 participants 2 messages Aug 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86/pci: Add missing forward declaration for pci_numachip_init()

At the moment, the function pci_numachip_init() is defined in the numachip.c file, but lacks matching forward declaration causing the following sparse and compile time warnings:

arch/x86/pci/numachip.c:108:12: warning: no previous prototype for function 'pci_numachip_init' [-Wmissing-prototypes] arch/x86/pci/numachip.c:108:12: warning: symbol 'pci_numachip_init' was not declared. Should it be static?

Thus, add missing include of asm/numachip/numachip.h that includes the missing forward declaration. This will resolve the aforementioned warnings.

---
 arch/x86/pci/numachip.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/pci/numachip.c +1 -0
index 01a085d9135a..4f0147d4e225 100644
@@ -12,6 +12,7 @@
 
 #include <linux/pci.h>
 #include <asm/pci_x86.h>
+#include <asm/numachip/numachip.h>
 
 static u8 limit __read_mostly;
 
Signature · 1 line
2.32.0
#1 lore raw
Quoted 4 lines · Krzysztof Wilczyński

At the moment, the function pci_numachip_init() is defined in the numachip.c file, but lacks matching forward declaration causing the following sparse and compile time warnings:

Quoted 8 lines

arch/x86/pci/numachip.c:108:12: warning: no previous prototype for function 'pci_numachip_init' [-Wmissing-prototypes] arch/x86/pci/numachip.c:108:12: warning: symbol 'pci_numachip_init' was not declared. Should it be static?

Thus, add missing include of asm/numachip/numachip.h that includes the missing forward declaration. This will resolve the aforementioned warnings.

Applied to pci/misc for v5.15, thanks!

Quoted 19 lines
---
 arch/x86/pci/numachip.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/pci/numachip.c +1 -0
index 01a085d9135a..4f0147d4e225 100644
@@ -12,6 +12,7 @@
 
 #include <linux/pci.h>
 #include <asm/pci_x86.h>
+#include <asm/numachip/numachip.h>
 
 static u8 limit __read_mostly;
 
Signature · 1 line
2.32.0