diff options
author | Paul Burton <paul.burton@imgtec.com> | 2014-01-27 16:23:04 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-03-26 23:09:09 +0100 |
commit | 6bbfd65e28c9d72eb140373c7796ce269616f2c0 (patch) | |
tree | 7acb04144c5ec79f7f416fed51ece88171f580e4 /arch/mips/kernel/signal.c | |
parent | MIPS: Don't require FPU on sigcontext setup/restore (diff) | |
download | linux-6bbfd65e28c9d72eb140373c7796ce269616f2c0.tar.xz linux-6bbfd65e28c9d72eb140373c7796ce269616f2c0.zip |
MIPS: Replace hardcoded 32 with NUM_FPU_REGS in ptrace
NUM_FPU_REGS just makes it clearer what's going on, rather than the
magic hard coded 32.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6424/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r-- | arch/mips/kernel/signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index e0178e117f68..0f97c7dc54e6 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -69,7 +69,7 @@ static int copy_fp_to_sigcontext(struct sigcontext __user *sc) int i; int err = 0; - for (i = 0; i < 32; i++) { + for (i = 0; i < NUM_FPU_REGS; i++) { err |= __put_user(get_fpr64(¤t->thread.fpu.fpr[i], 0), &sc->sc_fpregs[i]); @@ -85,7 +85,7 @@ static int copy_fp_from_sigcontext(struct sigcontext __user *sc) int err = 0; u64 fpr_val; - for (i = 0; i < 32; i++) { + for (i = 0; i < NUM_FPU_REGS; i++) { err |= __get_user(fpr_val, &sc->sc_fpregs[i]); set_fpr64(¤t->thread.fpu.fpr[i], 0, fpr_val); } |