Skip to content

Commit 51a9a82

Browse files
Colin Ian Kingbostrovs
authored andcommitted
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>
1 parent 2bd6bf0 commit 51a9a82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/include/asm/xen/hypercall.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,13 +552,13 @@ static inline void
552552
MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
553553
struct desc_struct desc)
554554
{
555-
u32 *p = (u32 *) &desc;
556-
557555
mcl->op = __HYPERVISOR_update_descriptor;
558556
if (sizeof(maddr) == sizeof(long)) {
559557
mcl->args[0] = maddr;
560558
mcl->args[1] = *(unsigned long *)&desc;
561559
} else {
560+
u32 *p = (u32 *)&desc;
561+
562562
mcl->args[0] = maddr;
563563
mcl->args[1] = maddr >> 32;
564564
mcl->args[2] = *p++;

0 commit comments

Comments
 (0)