Skip to content

Commit

Permalink
Avoid defining variables in the middle of a block which breaks older
Browse files Browse the repository at this point in the history
compilers.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent 7222424 commit c134a5e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions arch/mips/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,22 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
write_c0_status(flags);
break;
}
case DSP_BASE ... DSP_BASE + 5:
case DSP_BASE ... DSP_BASE + 5: {
dspreg_t *dregs;

if (!cpu_has_dsp) {
tmp = 0;
ret = -EIO;
goto out_tsk;
}
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]);
} else {
tmp = -1; /* DSP registers yet used */
}
break;
}
case DSP_CONTROL:
if (!cpu_has_dsp) {
tmp = 0;
Expand Down Expand Up @@ -270,15 +273,18 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
else
child->thread.fpu.soft.fcr31 = data;
break;
case DSP_BASE ... DSP_BASE + 5:
case DSP_BASE ... DSP_BASE + 5: {
dspreg_t *dregs;

if (!cpu_has_dsp) {
ret = -EIO;
break;
}

dspreg_t *dregs = __get_dsp_regs(child);
dregs = __get_dsp_regs(child);
dregs[addr - DSP_BASE] = data;
break;
}
case DSP_CONTROL:
if (!cpu_has_dsp) {
ret = -EIO;
Expand Down

0 comments on commit c134a5e

Please sign in to comment.