aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorDomen Puncer <domen@coderock.org>2005-06-25 17:58:44 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:58 -0400
commit3f3ae3471f4c5921274c3869eef21b5611e85b50 (patch)
treefc710ad0a42a733df23c78669a81b3ac3a293cce /arch/i386
parent29a1d2d1bc5a473eb88489251033b3c5651d2011 (diff)
[PATCH] arch/i386/kernel/traps.c: fix sparse warnings
Signed-off-by: Alexey Dobriyan <adobriyan@mail.ru> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/traps.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index c6077a5ef7ce..a61f33d06ea3 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -235,22 +235,22 @@ void show_registers(struct pt_regs *regs)
235 * time of the fault.. 235 * time of the fault..
236 */ 236 */
237 if (in_kernel) { 237 if (in_kernel) {
238 u8 *eip; 238 u8 __user *eip;
239 239
240 printk("\nStack: "); 240 printk("\nStack: ");
241 show_stack(NULL, (unsigned long*)esp); 241 show_stack(NULL, (unsigned long*)esp);
242 242
243 printk("Code: "); 243 printk("Code: ");
244 244
245 eip = (u8 *)regs->eip - 43; 245 eip = (u8 __user *)regs->eip - 43;
246 for (i = 0; i < 64; i++, eip++) { 246 for (i = 0; i < 64; i++, eip++) {
247 unsigned char c; 247 unsigned char c;
248 248
249 if (eip < (u8 *)PAGE_OFFSET || __get_user(c, eip)) { 249 if (eip < (u8 __user *)PAGE_OFFSET || __get_user(c, eip)) {
250 printk(" Bad EIP value."); 250 printk(" Bad EIP value.");
251 break; 251 break;
252 } 252 }
253 if (eip == (u8 *)regs->eip) 253 if (eip == (u8 __user *)regs->eip)
254 printk("<%02x> ", c); 254 printk("<%02x> ", c);
255 else 255 else
256 printk("%02x ", c); 256 printk("%02x ", c);
@@ -274,13 +274,13 @@ static void handle_BUG(struct pt_regs *regs)
274 274
275 if (eip < PAGE_OFFSET) 275 if (eip < PAGE_OFFSET)
276 goto no_bug; 276 goto no_bug;
277 if (__get_user(ud2, (unsigned short *)eip)) 277 if (__get_user(ud2, (unsigned short __user *)eip))
278 goto no_bug; 278 goto no_bug;
279 if (ud2 != 0x0b0f) 279 if (ud2 != 0x0b0f)
280 goto no_bug; 280 goto no_bug;
281 if (__get_user(line, (unsigned short *)(eip + 2))) 281 if (__get_user(line, (unsigned short __user *)(eip + 2)))
282 goto bug; 282 goto bug;
283 if (__get_user(file, (char **)(eip + 4)) || 283 if (__get_user(file, (char * __user *)(eip + 4)) ||
284 (unsigned long)file < PAGE_OFFSET || __get_user(c, file)) 284 (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
285 file = "<bad filename>"; 285 file = "<bad filename>";
286 286