sh: fix build error in fpu.c
PATCH 1/1 sh: fix build error in fpu.c
This patch fixes the following build error:
CC arch/sh/kernel/cpu/sh4/fpu.oarch/sh/kernel/cpu/sh4/fpu.c:405: warning: return type defaults to ‘int’ arch/sh/kernel/cpu/sh4/fpu.c:405: warning: function declaration isn’t a prototype arch/sh/kernel/cpu/sh4/fpu.c: In function ‘BUILD_TRAP_HANDLER’:arch/sh/kernel/cpu/sh4/fpu.c:407: error: ‘TRAP_HANDLER_DECL’ undeclared (first use in this function) arch/sh/kernel/cpu/sh4/fpu.c:407: error: (Each undeclared identifier is reported only once arch/sh/kernel/cpu/sh4/fpu.c:407: error: for each function it appears in.) arch/sh/kernel/cpu/sh4/fpu.c:409: error: ‘regs’ undeclared (first use in this function) arch/sh/kernel/cpu/sh4/fpu.c:423: warning: ‘return’ with no value, in function returning non-void
CC arch/sh/kernel/cpu/fpu.oarch/sh/kernel/cpu/fpu.c:80: warning: return type defaults to ‘int’ arch/sh/kernel/cpu/fpu.c:80: warning: function declaration isn’t a prototype arch/sh/kernel/cpu/fpu.c: In function ‘BUILD_TRAP_HANDLER’:arch/sh/kernel/cpu/fpu.c:81: error: ‘TRAP_HANDLER_DECL’ undeclared (first use in this function) arch/sh/kernel/cpu/fpu.c:81: error: (Each undeclared identifier is reported only once arch/sh/kernel/cpu/fpu.c:81: error: for each function it appears in.) arch/sh/kernel/cpu/fpu.c:83: error: ‘regs’ undeclared (first use in this function) arch/sh/kernel/cpu/fpu.c:83: error: called object ‘fpu_state_restore’ is not a function
--- arch/sh/kernel/cpu/fpu.c | 1 + arch/sh/kernel/cpu/sh4/fpu.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
arch/sh/kernel/cpu/fpu.c +1 -0
@@ -2,6 +2,7 @@#include <linux/slab.h> #include <asm/processor.h> #include <asm/fpu.h> +#include <asm/traps.h> int init_fpu (struct task_struct *tsk) {
arch/sh/kernel/cpu/sh4/fpu.c +1 -0
@@ -16,6 +16,7 @@#include <cpu/fpu.h> #include <asm/processor.h> #include <asm/fpu.h> +#include <asm/traps.h> /* The PR (precision) bit in the FP Status Register must be clear when * an frchg instruction is executed, otherwise the instruction is undefined.
Signature · 1 line
1.7.1
Quoted 21 lines · Yoshihiro
This patch fixes the following build error:
CC
arch/sh/kernel/cpu/sh4/fpu.oarch/sh/kernel/cpu/sh4/fpu.c:405: warning: return type defaults to ???int???arch/sh/kernel/cpu/sh4/fpu.c:405: warning: function declaration isn???t a prototypearch/sh/kernel/cpu/sh4/fpu.c: In function ???BUILD_TRAP_HANDLER???:arch/sh/kernel/cpu/sh4/fpu.c:407: error: ???TRAP_HANDLER_DECL??? undeclared (first use in this function)arch/sh/kernel/cpu/sh4/fpu.c:407: error: (Each undeclared identifier is reported only oncearch/sh/kernel/cpu/sh4/fpu.c:407: error: for each function it appears in.)arch/sh/kernel/cpu/sh4/fpu.c:409: error: ???regs??? undeclared (first use in this function)arch/sh/kernel/cpu/sh4/fpu.c:423: warning: ???return??? with no value, in function returning non-void
CCarch/sh/kernel/cpu/fpu.oarch/sh/kernel/cpu/fpu.c:80: warning: return type defaults to ???int???arch/sh/kernel/cpu/fpu.c:80: warning: function declaration isn???t a prototypearch/sh/kernel/cpu/fpu.c: In function ???BUILD_TRAP_HANDLER???:arch/sh/kernel/cpu/fpu.c:81: error: ???TRAP_HANDLER_DECL??? undeclared (first use in this function)arch/sh/kernel/cpu/fpu.c:81: error: (Each undeclared identifier is reported only oncearch/sh/kernel/cpu/fpu.c:81: error: for each function it appears in.)arch/sh/kernel/cpu/fpu.c:83: error: ???regs??? undeclared (first use in this function)arch/sh/kernel/cpu/fpu.c:83: error: called object ???fpu_state_restore??? is not a function
Quoted 1 line
Signed-off-by Yoshihiro Shimoda <[email protected]>
Already fixed in my tree.