From 77a75333a3d16b830ccf47cf51d944655b015363 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 11 Jan 2006 22:46:30 +0100 Subject: [PATCH] [PATCH] x86_64: sparse warning cleanups Fix some trivial sparse warnings in x86_64 code. Signed-off-by: Stephen Hemminger Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/traps.c | 2 +- include/asm-x86_64/vsyscall.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 08325b1f871d..fcee07db3b68 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c @@ -345,7 +345,7 @@ void handle_BUG(struct pt_regs *regs) if (user_mode(regs)) 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))) return; if (f.filename >= 0 || diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 438a3f52f839..a85e16f56d73 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h @@ -36,8 +36,8 @@ struct vxtime_data { 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) */ extern struct vxtime_data __vxtime; -- 2.20.1