From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
konrad.wilk@oracle.com, david.vrabel@citrix.com,
boris.ostrovsky@oracle.com
Cc: Juergen Gross <jgross@suse.com>
Subject: [PATCH] xen: fix sparse warning in p2m.c
Date: Fri, 5 Dec 2014 07:16:35 +0100 [thread overview]
Message-ID: <1417760195-16911-1-git-send-email-jgross@suse.com> (raw)
The patch "Speed up set_phys_to_machine() by using read-only mappings"
introduced a sparse warning:
arch/x86/xen/p2m.c:628:13: sparse: incorrect type in argument 1
(different address spaces)
Avoid the warning.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/xen/p2m.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 8b5db51..2defca9 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -615,6 +615,7 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)
{
pte_t *ptep;
unsigned int level;
+ unsigned long __user *addr;
/* don't track P2M changes in autotranslate guests */
if (unlikely(xen_feature(XENFEAT_auto_translated_physmap)))
@@ -625,7 +626,8 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)
return true;
}
- if (likely(!__put_user(mfn, xen_p2m_addr + pfn)))
+ addr = (unsigned long __user *)xen_p2m_addr + pfn;
+ if (likely(!__put_user(mfn, addr)))
return true;
ptep = lookup_address((unsigned long)(xen_p2m_addr + pfn), &level);
--
2.1.2
next reply other threads:[~2014-12-05 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 6:16 Juergen Gross [this message]
2014-12-05 10:43 ` [Xen-devel] " David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417760195-16911-1-git-send-email-jgross@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®