diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-06-30 05:42:00 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:31:33 -0400 |
commit | c134a5ecdb8f4aee09feca0d4d395915e752fcb8 (patch) | |
tree | 329cc17a215fa9aedfbfefe70b9dd8f29fcdfe45 /arch/mips/kernel/ptrace.c | |
parent | 7222424e2eb7915bceb34b915150f2fc76e0477c (diff) |
Avoid defining variables in the middle of a block which breaks older
compilers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/ptrace.c')
-rw-r--r-- | arch/mips/kernel/ptrace.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 2441e32ce820..74283369a1e3 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -177,19 +177,22 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
177 | write_c0_status(flags); | 177 | write_c0_status(flags); |
178 | break; | 178 | break; |
179 | } | 179 | } |
180 | case DSP_BASE ... DSP_BASE + 5: | 180 | case DSP_BASE ... DSP_BASE + 5: { |
181 | dspreg_t *dregs; | ||
182 | |||
181 | if (!cpu_has_dsp) { | 183 | if (!cpu_has_dsp) { |
182 | tmp = 0; | 184 | tmp = 0; |
183 | ret = -EIO; | 185 | ret = -EIO; |
184 | goto out_tsk; | 186 | goto out_tsk; |
185 | } | 187 | } |
186 | if (child->thread.dsp.used_dsp) { | 188 | if (child->thread.dsp.used_dsp) { |
187 | dspreg_t *dregs = __get_dsp_regs(child); | 189 | dregs = __get_dsp_regs(child); |
188 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); | 190 | tmp = (unsigned long) (dregs[addr - DSP_BASE]); |
189 | } else { | 191 | } else { |
190 | tmp = -1; /* DSP registers yet used */ | 192 | tmp = -1; /* DSP registers yet used */ |
191 | } | 193 | } |
192 | break; | 194 | break; |
195 | } | ||
193 | case DSP_CONTROL: | 196 | case DSP_CONTROL: |
194 | if (!cpu_has_dsp) { | 197 | if (!cpu_has_dsp) { |
195 | tmp = 0; | 198 | tmp = 0; |
@@ -270,15 +273,18 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
270 | else | 273 | else |
271 | child->thread.fpu.soft.fcr31 = data; | 274 | child->thread.fpu.soft.fcr31 = data; |
272 | break; | 275 | break; |
273 | case DSP_BASE ... DSP_BASE + 5: | 276 | case DSP_BASE ... DSP_BASE + 5: { |
277 | dspreg_t *dregs; | ||
278 | |||
274 | if (!cpu_has_dsp) { | 279 | if (!cpu_has_dsp) { |
275 | ret = -EIO; | 280 | ret = -EIO; |
276 | break; | 281 | break; |
277 | } | 282 | } |
278 | 283 | ||
279 | dspreg_t *dregs = __get_dsp_regs(child); | 284 | dregs = __get_dsp_regs(child); |
280 | dregs[addr - DSP_BASE] = data; | 285 | dregs[addr - DSP_BASE] = data; |
281 | break; | 286 | break; |
287 | } | ||
282 | case DSP_CONTROL: | 288 | case DSP_CONTROL: |
283 | if (!cpu_has_dsp) { | 289 | if (!cpu_has_dsp) { |
284 | ret = -EIO; | 290 | ret = -EIO; |