From 55f7ee152656eda28a43b6add8b9b702fb0e417e Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Mon, 22 Dec 2014 17:03:32 +0900 Subject: [PATCH] fix a warning | mckernel/kernel/../arch/x86/kernel/memory.c: In function '__set_pt_page': | mckernel/kernel/../arch/x86/kernel/memory.c:367: | warning: 'init_pt_lock_flags' may be used uninitialized in this function --- arch/x86/kernel/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/memory.c b/arch/x86/kernel/memory.c index 586d0e48..25e772e7 100644 --- a/arch/x86/kernel/memory.c +++ b/arch/x86/kernel/memory.c @@ -367,6 +367,7 @@ static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys, unsigned long init_pt_lock_flags; int ret = -ENOMEM; + init_pt_lock_flags = 0; /* for avoidance of warning */ if (in_kernel) { init_pt_lock_flags = ihk_mc_spinlock_lock(&init_pt_lock); }