x86/pci: Add missing forward declaration for pci_numachip_init()
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
@@ -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
Bjorn Helgaas
AppliedQuoted 4 lines · Krzysztof Wilczyński
At the moment, the function
pci_numachip_init()is defined in thenumachip.cfile, 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.hthat includes the missing forward declaration. This will resolve the aforementioned warnings.Signed-off-by Krzysztof Wilczyński <[email protected]>
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@@ -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