diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-31 05:30:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 15:18:51 -0500 |
commit | 4d338e1accfc3473f7e453427dfd4f1ebf4dbbe6 (patch) | |
tree | ac6559e533cd4720b5c5b13119b3d10f0ab8b51d /arch/um/sys-i386/ptrace.c | |
parent | 694a464e19b9e3278dbaf6a09fa7c1efec3f8eb5 (diff) |
[PATCH] uml: sparse cleanups
misc sparse annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/sys-i386/ptrace.c')
-rw-r--r-- | arch/um/sys-i386/ptrace.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c index 8032a105949a..ff94eded93eb 100644 --- a/arch/um/sys-i386/ptrace.c +++ b/arch/um/sys-i386/ptrace.c | |||
@@ -124,22 +124,22 @@ unsigned long getreg(struct task_struct *child, int regno) | |||
124 | int peek_user(struct task_struct *child, long addr, long data) | 124 | int peek_user(struct task_struct *child, long addr, long data) |
125 | { | 125 | { |
126 | /* read the word at location addr in the USER area. */ | 126 | /* read the word at location addr in the USER area. */ |
127 | unsigned long tmp; | 127 | unsigned long tmp; |
128 | 128 | ||
129 | if ((addr & 3) || addr < 0) | 129 | if ((addr & 3) || addr < 0) |
130 | return -EIO; | 130 | return -EIO; |
131 | 131 | ||
132 | tmp = 0; /* Default return condition */ | 132 | tmp = 0; /* Default return condition */ |
133 | if(addr < MAX_REG_OFFSET){ | 133 | if(addr < MAX_REG_OFFSET){ |
134 | tmp = getreg(child, addr); | 134 | tmp = getreg(child, addr); |
135 | } | 135 | } |
136 | else if((addr >= offsetof(struct user, u_debugreg[0])) && | 136 | else if((addr >= offsetof(struct user, u_debugreg[0])) && |
137 | (addr <= offsetof(struct user, u_debugreg[7]))){ | 137 | (addr <= offsetof(struct user, u_debugreg[7]))){ |
138 | addr -= offsetof(struct user, u_debugreg[0]); | 138 | addr -= offsetof(struct user, u_debugreg[0]); |
139 | addr = addr >> 2; | 139 | addr = addr >> 2; |
140 | tmp = child->thread.arch.debugregs[addr]; | 140 | tmp = child->thread.arch.debugregs[addr]; |
141 | } | 141 | } |
142 | return put_user(tmp, (unsigned long *) data); | 142 | return put_user(tmp, (unsigned long __user *) data); |
143 | } | 143 | } |
144 | 144 | ||
145 | struct i387_fxsave_struct { | 145 | struct i387_fxsave_struct { |