[PATCH] mm: Fix compile warning of mmotm-2012-09-06-16-46

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I compiled today, I met following warning.
Correct it.

mm/memory.c: In function ‘copy_page_range’:
include/linux/mmu_notifier.h:235:38: warning: ‘mmun_end’ may be used uninitialized in this function [-Wuninitialized]
mm/memory.c:1043:16: note: ‘mmun_end’ was declared here
include/linux/mmu_notifier.h:235:38: warning: ‘mmun_start’ may be used uninitialized in this function [-Wuninitialized]
mm/memory.c:1042:16: note: ‘mmun_start’ was declared here
  LD      mm/built-in.o

Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
Cc: Haggai Eran <haggaie@xxxxxxxxxxxx>
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
 mm/memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 10e9b38..d000449 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1039,8 +1039,8 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
 	unsigned long next;
 	unsigned long addr = vma->vm_start;
 	unsigned long end = vma->vm_end;
-	unsigned long mmun_start;	/* For mmu_notifiers */
-	unsigned long mmun_end;		/* For mmu_notifiers */
+	unsigned long uninitialized_var(mmun_start);	/* For mmu_notifiers */
+	unsigned long uninitialized_var(mmun_end);	/* For mmu_notifiers */
 	int ret;
 
 	/*
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]