Browse Source

[PATCH] x86_64: sparse warning cleanups

Fix some trivial sparse warnings in x86_64 code.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stephen Hemminger 19 năm trước cách đây
mục cha
commit
77a75333a3

+ 1 - 1
arch/x86_64/kernel/traps.c

@@ -345,7 +345,7 @@ void handle_BUG(struct pt_regs *regs)
 
 
 	if (user_mode(regs))
 	if (user_mode(regs))
 		return; 
 		return; 
-	if (__copy_from_user(&f, (struct bug_frame *) regs->rip, 
+	if (__copy_from_user(&f, (const void __user *) regs->rip,
 			     sizeof(struct bug_frame)))
 			     sizeof(struct bug_frame)))
 		return; 
 		return; 
 	if (f.filename >= 0 ||
 	if (f.filename >= 0 ||

+ 2 - 2
include/asm-x86_64/vsyscall.h

@@ -36,8 +36,8 @@ struct vxtime_data {
 	int mode;
 	int mode;
 };
 };
 
 
-#define hpet_readl(a)           readl((void *)fix_to_virt(FIX_HPET_BASE) + a)
-#define hpet_writel(d,a)        writel(d, (void *)fix_to_virt(FIX_HPET_BASE) + a)
+#define hpet_readl(a)           readl((const void __iomem *)fix_to_virt(FIX_HPET_BASE) + a)
+#define hpet_writel(d,a)        writel(d, (void __iomem *)fix_to_virt(FIX_HPET_BASE) + a)
 
 
 /* vsyscall space (readonly) */
 /* vsyscall space (readonly) */
 extern struct vxtime_data __vxtime;
 extern struct vxtime_data __vxtime;