Skip to content

Commit 635093e

Browse files
atishp04palmer-dabbelt
authored andcommitted
RISC-V: Fix build warning for smpboot.c
The following warnings are reported by kbuild with W=1. >> arch/riscv/kernel/smpboot.c:109:5: warning: no previous prototype for 'start_secondary_cpu' [-Wmissing-prototypes] 109 | int start_secondary_cpu(int cpu, struct task_struct *tidle) | ^~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/smpboot.c:146:34: warning: no previous prototype for 'smp_callin' [-Wmissing-prototypes] 146 | asmlinkage __visible void __init smp_callin(void) | ^~~~~~~~~~ Fix the warnings by marking the local functions static and adding the prototype for the global function. Signed-off-by: Atish Patra <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 3843aca commit 635093e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/riscv/include/asm/smp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ void arch_send_call_function_single_ipi(int cpu);
4040
int riscv_hartid_to_cpuid(int hartid);
4141
void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out);
4242

43+
/* Secondary hart entry */
44+
asmlinkage void smp_callin(void);
45+
4346
/*
4447
* Obtains the hart ID of the currently executing task. This relies on
4548
* THREAD_INFO_IN_TASK, but we define that unconditionally.

arch/riscv/kernel/smpboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void __init setup_smp(void)
106106
}
107107
}
108108

109-
int start_secondary_cpu(int cpu, struct task_struct *tidle)
109+
static int start_secondary_cpu(int cpu, struct task_struct *tidle)
110110
{
111111
if (cpu_ops[cpu]->cpu_start)
112112
return cpu_ops[cpu]->cpu_start(cpu, tidle);

0 commit comments

Comments
 (0)