kernel: mips_disable_fpu: initialize fault_addr in fpu_emulator_cop1Handler
authorJonas Gorski <jogo@openwrt.org>
Sun, 5 Jul 2015 21:31:54 +0000 (21:31 +0000)
committerJonas Gorski <jogo@openwrt.org>
Sun, 5 Jul 2015 21:31:54 +0000 (21:31 +0000)
commit77c096608407efd6d1e49e5aa22e3dd17628dea4
treeb85ad17b1d06e3852f9a612ba5e39d74937c7722
parent4326b43745a5b2469f863f7f4b819f33dc06e62b
kernel: mips_disable_fpu: initialize fault_addr in fpu_emulator_cop1Handler

Code calling fpu_emulator_cop1Handler will pass on fault_addr, making gcc
complain about it not being initialized when the FPU emulator is disabled.

Fixes:

arch/mips/kernel/traps.c: In function 'do_fpe':
arch/mips/kernel/traps.c:864:22: error: 'fault_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  process_fpemu_return(sig, fault_addr, fcr31);
                      ^
arch/mips/kernel/traps.c: In function 'do_ri':
arch/mips/kernel/traps.c:806:22: error: 'fault_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  process_fpemu_return(sig, fault_addr, fcr31);
                      ^
arch/mips/kernel/traps.c:763:15: note: 'fault_addr' was declared here
  void __user *fault_addr;
               ^
arch/mips/kernel/traps.c: In function 'do_cpu':
arch/mips/kernel/traps.c:1421:28: error: 'fault_addr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (!process_fpemu_return(sig, fault_addr, fcr31) && !err)
                            ^
cc1: all warnings being treated as errors
make[7]: *** [arch/mips/kernel/traps.o] Error 1

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46184
target/linux/generic/patches-4.1/304-mips_disable_fpu.patch