All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: two trivial sparse annotations
@ 2008-10-29  6:05 Harvey Harrison
  2008-10-29  7:03 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-10-29  6:05 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: H. Peter Anvin, Thomas Gleixner, LKML

arch/x86/kernel/vsmp_64.c:87:14: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:87:14:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:87:14:    got void *[assigned] address
arch/x86/kernel/vsmp_64.c:88:22: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:88:22:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:88:22:    got void *
arch/x86/kernel/vsmp_64.c:100:23: warning: incorrect type in argument 2 (different address spaces)
arch/x86/kernel/vsmp_64.c:100:23:    expected void volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:100:23:    got void *
arch/x86/kernel/vsmp_64.c:101:23: warning: incorrect type in argument 1 (different address spaces)
arch/x86/kernel/vsmp_64.c:101:23:    expected void const volatile [noderef] <asn:2>*addr
arch/x86/kernel/vsmp_64.c:101:23:    got void *
arch/x86/mm/gup.c:235:6: warning: incorrect type in argument 1 (different base types)
arch/x86/mm/gup.c:235:6:    expected void const volatile [noderef] <asn:1>*<noident>
arch/x86/mm/gup.c:235:6:    got unsigned long [unsigned] [assigned] start

Impact: fewer sparse warnings, no functional changes

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 arch/x86/kernel/vsmp_64.c |    2 +-
 arch/x86/mm/gup.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index 7766d36..a688f3b 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -78,7 +78,7 @@ static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
 
 static void __init set_vsmp_pv_ops(void)
 {
-	void *address;
+	void __iomem *address;
 	unsigned int cap, ctl, cfg;
 
 	/* set vSMP magic bits to indicate vSMP capable kernel */
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
index 4ba373c..be54176 100644
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
@@ -233,7 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
 	len = (unsigned long) nr_pages << PAGE_SHIFT;
 	end = start + len;
 	if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ,
-					start, len)))
+					(void __user *)start, len)))
 		goto slow_irqon;
 
 	/*
-- 
1.6.0.3.756.gb776d




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86: two trivial sparse annotations
  2008-10-29  6:05 [PATCH] x86: two trivial sparse annotations Harvey Harrison
@ 2008-10-29  7:03 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-10-29  7:03 UTC (permalink / raw)
  To: Harvey Harrison; +Cc: H. Peter Anvin, Thomas Gleixner, LKML


* Harvey Harrison <harvey.harrison@gmail.com> wrote:

> arch/x86/kernel/vsmp_64.c:87:14: warning: incorrect type in argument 1 (different address spaces)
> arch/x86/kernel/vsmp_64.c:87:14:    expected void const volatile [noderef] <asn:2>*addr
> arch/x86/kernel/vsmp_64.c:87:14:    got void *[assigned] address
> arch/x86/kernel/vsmp_64.c:88:22: warning: incorrect type in argument 1 (different address spaces)
> arch/x86/kernel/vsmp_64.c:88:22:    expected void const volatile [noderef] <asn:2>*addr
> arch/x86/kernel/vsmp_64.c:88:22:    got void *
> arch/x86/kernel/vsmp_64.c:100:23: warning: incorrect type in argument 2 (different address spaces)
> arch/x86/kernel/vsmp_64.c:100:23:    expected void volatile [noderef] <asn:2>*addr
> arch/x86/kernel/vsmp_64.c:100:23:    got void *
> arch/x86/kernel/vsmp_64.c:101:23: warning: incorrect type in argument 1 (different address spaces)
> arch/x86/kernel/vsmp_64.c:101:23:    expected void const volatile [noderef] <asn:2>*addr
> arch/x86/kernel/vsmp_64.c:101:23:    got void *
> arch/x86/mm/gup.c:235:6: warning: incorrect type in argument 1 (different base types)
> arch/x86/mm/gup.c:235:6:    expected void const volatile [noderef] <asn:1>*<noident>
> arch/x86/mm/gup.c:235:6:    got unsigned long [unsigned] [assigned] start
> 
> Impact: fewer sparse warnings, no functional changes
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
>  arch/x86/kernel/vsmp_64.c |    2 +-
>  arch/x86/mm/gup.c         |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

applied to tip/x86/urgent, thanks Harvey!

i see you started using the impact-line, nice :) I moved it to the top 
of the commit, that's where we generally put it. (it acts as a 
secondary subject line in essence, so sits right next to the first 
line of the commit)

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-29  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29  6:05 [PATCH] x86: two trivial sparse annotations Harvey Harrison
2008-10-29  7:03 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.