[PATCH] csky: Remove compile warning for CONFIG_SMP

guoren@kernel.org posted 1 patch 3 months, 3 weeks ago
arch/csky/include/asm/sections.h | 1 +
1 file changed, 1 insertion(+)
[PATCH] csky: Remove compile warning for CONFIG_SMP
Posted by guoren@kernel.org 3 months, 3 weeks ago
From: "Guo Ren (Alibaba DAMO Academy)" <guoren@kernel.org>

When CONFIG_SMP is enabled, there is a compile warning:

arch/csky/kernel/smp.c:242:6: warning: no previous prototype for
'csky_start_secondary' [-Wmissing-prototypes]
  242 | void csky_start_secondary(void)
      |      ^~~~~~~~~~~~~~~~~~~~

Add a similar prototype with csky_start in sections.h.

Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>
---
 arch/csky/include/asm/sections.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/csky/include/asm/sections.h b/arch/csky/include/asm/sections.h
index 83e82b7c0f6c..ee5cdf226a9b 100644
--- a/arch/csky/include/asm/sections.h
+++ b/arch/csky/include/asm/sections.h
@@ -8,5 +8,6 @@
 extern char _start[];
 
 asmlinkage void csky_start(unsigned int unused, void *dtb_start);
+asmlinkage void csky_start_secondary(void);
 
 #endif /* __ASM_SECTIONS_H */
-- 
2.40.1
Re: [PATCH] csky: Remove compile warning for CONFIG_SMP
Posted by Randy Dunlap 3 months, 3 weeks ago

On 10/19/25 4:02 AM, guoren@kernel.org wrote:
> From: "Guo Ren (Alibaba DAMO Academy)" <guoren@kernel.org>
> 
> When CONFIG_SMP is enabled, there is a compile warning:
> 
> arch/csky/kernel/smp.c:242:6: warning: no previous prototype for
> 'csky_start_secondary' [-Wmissing-prototypes]
>   242 | void csky_start_secondary(void)
>       |      ^~~~~~~~~~~~~~~~~~~~
> 
> Add a similar prototype with csky_start in sections.h.
> 
> Signed-off-by: Guo Ren (Alibaba DAMO Academy) <guoren@kernel.org>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  arch/csky/include/asm/sections.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/csky/include/asm/sections.h b/arch/csky/include/asm/sections.h
> index 83e82b7c0f6c..ee5cdf226a9b 100644
> --- a/arch/csky/include/asm/sections.h
> +++ b/arch/csky/include/asm/sections.h
> @@ -8,5 +8,6 @@
>  extern char _start[];
>  
>  asmlinkage void csky_start(unsigned int unused, void *dtb_start);
> +asmlinkage void csky_start_secondary(void);
>  
>  #endif /* __ASM_SECTIONS_H */

-- 
~Randy