mm: fix build warning for uninitialized value
authorDavid Rientjes <rientjes@google.com>
Fri, 16 Nov 2012 22:14:48 +0000 (14:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Nov 2012 22:33:03 +0000 (14:33 -0800)
commit1756954c61cb5c97c618ccb366482b9c1f891d6d
tree86a8ab12560d600fa5459218979e72827e0311f5
parent63c3b902e517012b127d6528434b928ceaa10f7b
mm: fix build warning for uninitialized value

do_wp_page() sets mmun_called if mmun_start and mmun_end were
initialized and, if so, may call mmu_notifier_invalidate_range_end()
with these values.  This doesn't prevent gcc from emitting a build
warning though:

  mm/memory.c: In function `do_wp_page':
  mm/memory.c:2530: warning: `mmun_start' may be used uninitialized in this function
  mm/memory.c:2531: warning: `mmun_end' may be used uninitialized in this function

It's much easier to initialize the variables to impossible values and do
a simple comparison to determine if they were initialized to remove the
bool entirely.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c