提交 3055acb0 编写于 作者: A Atsushi Nemoto 提交者: Ralf Baechle

[MIPS] Sparse: Fix some compiler/sparse warnings in ptrace32.c

Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 b6f7880b
...@@ -88,7 +88,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) ...@@ -88,7 +88,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
ret = -EIO; ret = -EIO;
if (copied != sizeof(tmp)) if (copied != sizeof(tmp))
break; break;
ret = put_user(tmp, (unsigned int *) (unsigned long) data); ret = put_user(tmp, (unsigned int __user *) (unsigned long) data);
break; break;
} }
...@@ -174,8 +174,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) ...@@ -174,8 +174,10 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
case FPC_EIR: { /* implementation / version register */ case FPC_EIR: { /* implementation / version register */
unsigned int flags; unsigned int flags;
if (!cpu_has_fpu) if (!cpu_has_fpu) {
tmp = 0;
break; break;
}
preempt_disable(); preempt_disable();
if (cpu_has_mipsmt) { if (cpu_has_mipsmt) {
...@@ -194,15 +196,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) ...@@ -194,15 +196,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
preempt_enable(); preempt_enable();
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;
} }
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]);
break; break;
}
case DSP_CONTROL: case DSP_CONTROL:
if (!cpu_has_dsp) { if (!cpu_has_dsp) {
tmp = 0; tmp = 0;
...@@ -216,7 +221,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) ...@@ -216,7 +221,7 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
ret = -EIO; ret = -EIO;
goto out_tsk; goto out_tsk;
} }
ret = put_user(tmp, (unsigned *) (unsigned long) data); ret = put_user(tmp, (unsigned __user *) (unsigned long) data);
break; break;
} }
...@@ -304,15 +309,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data) ...@@ -304,15 +309,18 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册