Skip to content

Commit

Permalink
openrisc: Include cpu.h and switch_to.h for prototypes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Closes: https://lore.kernel.org/linux-kernel/[email protected]/
Signed-off-by: Stafford Horne <[email protected]>
  • Loading branch information
stffrdhrn committed Aug 21, 2023
1 parent 31c67b5 commit 136a2d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/openrisc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

#define __KERNEL_SYSCALLS__
#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
Expand All @@ -38,6 +39,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/spr_defs.h>
#include <asm/switch_to.h>

#include <linux/smp.h>

Expand Down

0 comments on commit 136a2d8

Please sign in to comment.