Commit c134a5ec authored by Ralf Baechle's avatar Ralf Baechle

Avoid defining variables in the middle of a block which breaks older

compilers.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 7222424e
...@@ -177,19 +177,22 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ...@@ -177,19 +177,22 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
write_c0_status(flags); write_c0_status(flags);
break; break;
} }
case DSP_BASE ... DSP_BASE + 5: case DSP_BASE ... DSP_BASE + 5: {
dspreg_t *dregs;
if (!cpu_has_dsp) { if (!cpu_has_dsp) {
tmp = 0; tmp = 0;
ret = -EIO; ret = -EIO;
goto out_tsk; goto out_tsk;
} }
if (child->thread.dsp.used_dsp) { if (child->thread.dsp.used_dsp) {
dspreg_t *dregs = __get_dsp_regs(child); dregs = __get_dsp_regs(child);
tmp = (unsigned long) (dregs[addr - DSP_BASE]); tmp = (unsigned long) (dregs[addr - DSP_BASE]);
} else { } else {
tmp = -1; /* DSP registers yet used */ tmp = -1; /* DSP registers yet used */
} }
break; break;
}
case DSP_CONTROL: case DSP_CONTROL:
if (!cpu_has_dsp) { if (!cpu_has_dsp) {
tmp = 0; tmp = 0;
...@@ -270,15 +273,18 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) ...@@ -270,15 +273,18 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
else else
child->thread.fpu.soft.fcr31 = data; child->thread.fpu.soft.fcr31 = data;
break; break;
case DSP_BASE ... DSP_BASE + 5: case DSP_BASE ... DSP_BASE + 5: {
dspreg_t *dregs;
if (!cpu_has_dsp) { if (!cpu_has_dsp) {
ret = -EIO; ret = -EIO;
break; break;
} }
dspreg_t *dregs = __get_dsp_regs(child); dregs = __get_dsp_regs(child);
dregs[addr - DSP_BASE] = data; dregs[addr - DSP_BASE] = data;
break; break;
}
case DSP_CONTROL: case DSP_CONTROL:
if (!cpu_has_dsp) { if (!cpu_has_dsp) {
ret = -EIO; ret = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment