aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-18 05:03:12 -0400
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2017-09-21 12:34:03 -0400
commit51a9a8284e43642fc3e85810fd54f4c245d23a14 (patch)
treec432175af134fd1bdb5dd9d6190cfa56f422bd0c
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
x86/xen: clean up clang build warning
In the case where sizeof(maddr) != sizeof(long) p is initialized and never read and clang throws a warning on this. Move declaration of p to clean up the clang build warning: warning: Value stored to 'p' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
-rw-r--r--arch/x86/include/asm/xen/hypercall.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index 9606688caa4b..e089c1675a7c 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -552,13 +552,13 @@ static inline void
552MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr, 552MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
553 struct desc_struct desc) 553 struct desc_struct desc)
554{ 554{
555 u32 *p = (u32 *) &desc;
556
557 mcl->op = __HYPERVISOR_update_descriptor; 555 mcl->op = __HYPERVISOR_update_descriptor;
558 if (sizeof(maddr) == sizeof(long)) { 556 if (sizeof(maddr) == sizeof(long)) {
559 mcl->args[0] = maddr; 557 mcl->args[0] = maddr;
560 mcl->args[1] = *(unsigned long *)&desc; 558 mcl->args[1] = *(unsigned long *)&desc;
561 } else { 559 } else {
560 u32 *p = (u32 *)&desc;
561
562 mcl->args[0] = maddr; 562 mcl->args[0] = maddr;
563 mcl->args[1] = maddr >> 32; 563 mcl->args[1] = maddr >> 32;
564 mcl->args[2] = *p++; 564 mcl->args[2] = *p++;