diff mbox series

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

Message ID 20210812171717.1471243-1-kw@linux.com (mailing list archive)
State Accepted
Delegated to: Bjorn Helgaas
Headers show
Series [v2] x86/pci: Add missing forward declaration for pci_numachip_init() | expand

Commit Message

Krzysztof Wilczyński Aug. 12, 2021, 5:17 p.m. UTC
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.

Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
---
 arch/x86/pci/numachip.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bjorn Helgaas Aug. 12, 2021, 7:12 p.m. UTC | #1
On Thu, Aug 12, 2021 at 05:17:17PM +0000, Krzysztof Wilczyński wrote:
> 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.
> 
> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>

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

> ---
>  arch/x86/pci/numachip.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/pci/numachip.c b/arch/x86/pci/numachip.c
> index 01a085d9135a..4f0147d4e225 100644
> --- a/arch/x86/pci/numachip.c
> +++ b/arch/x86/pci/numachip.c
> @@ -12,6 +12,7 @@
>  
>  #include <linux/pci.h>
>  #include <asm/pci_x86.h>
> +#include <asm/numachip/numachip.h>
>  
>  static u8 limit __read_mostly;
>  
> -- 
> 2.32.0
>
diff mbox series

Patch

diff --git a/arch/x86/pci/numachip.c b/arch/x86/pci/numachip.c
index 01a085d9135a..4f0147d4e225 100644
--- a/arch/x86/pci/numachip.c
+++ b/arch/x86/pci/numachip.c
@@ -12,6 +12,7 @@ 
 
 #include <linux/pci.h>
 #include <asm/pci_x86.h>
+#include <asm/numachip/numachip.h>
 
 static u8 limit __read_mostly;