Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] Fix missing prototypes in asm/fpu.h

While building the Malta defconfig, sparse spat the following
warnings:

>>>>>>>>>>>>>>>>>>
arch/mips/math-emu/kernel_linkage.c:31:6: warning: symbol
'fpu_emulator_init_fpu' was not declared. Should it be static?

arch/mips/math-emu/kernel_linkage.c:54:5: warning: symbol
'fpu_emulator_save_context' was not declared. Should it be
static?

arch/mips/math-emu/kernel_linkage.c:68:5: warning: symbol
'fpu_emulator_restore_context' was not declared. Should it be
static?
>>>>>>>>>>>>>>>>>>

This patch fixes these errors by adding the proper prototypes
to the include/asm-mips/fpu.h header, and actually using this
header in the sparse-spotted source file.

Build-tested with Malta defconfig.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Dmitri Vorobiev and committed by
Ralf Baechle
f028b860 3450004a

+3
+1
arch/mips/math-emu/kernel_linkage.c
··· 24 24 #include <asm/signal.h> 25 25 #include <asm/uaccess.h> 26 26 27 + #include <asm/fpu.h> 27 28 #include <asm/fpu_emulator.h> 28 29 29 30 #define SIGNALLING_NAN 0x7ff800007ff80000LL
+2
include/asm-mips/fpu.h
··· 35 35 extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 __user *sc); 36 36 37 37 extern void fpu_emulator_init_fpu(void); 38 + extern int fpu_emulator_save_context(struct sigcontext __user *sc); 39 + extern int fpu_emulator_restore_context(struct sigcontext __user *sc); 38 40 extern void _init_fpu(void); 39 41 extern void _save_fp(struct task_struct *); 40 42 extern void _restore_fp(struct task_struct *);