Skip to content

Commit 136a2d8

Browse files
committed
openrisc: Include cpu.h and switch_to.h for prototypes
When compiling with W=1 enabling -Wmissing-prototypes the compiler warns: arch/openrisc/kernel/process.c:100:6: error: no previous prototype for 'arch_cpu_idle' [-Werror=missing-prototypes] arch/openrisc/kernel/process.c:240:21: error: no previous prototype for '__switch_to' [-Werror=missing-prototypes] Fix these by adding the approrpiate header files to process.c which brings in the prototype definitions. Reported-by: Arnd Bergmann <arnd@arndb.de> Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/ Signed-off-by: Stafford Horne <shorne@gmail.com>
1 parent 31c67b5 commit 136a2d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/openrisc/kernel/process.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
#define __KERNEL_SYSCALLS__
17+
#include <linux/cpu.h>
1718
#include <linux/errno.h>
1819
#include <linux/sched.h>
1920
#include <linux/sched/debug.h>
@@ -38,6 +39,7 @@
3839
#include <asm/io.h>
3940
#include <asm/processor.h>
4041
#include <asm/spr_defs.h>
42+
#include <asm/switch_to.h>
4143

4244
#include <linux/smp.h>
4345

0 commit comments

Comments
 (0)