]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix build warning for uninitialized value
authorDavid Rientjes <rientjes@google.com>
Thu, 15 Nov 2012 02:31:02 +0000 (13:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Nov 2012 02:31:02 +0000 (13:31 +1100)
commit990b35da49f1dbb35591214db93789fcac4ada25
tree57f26d90084e2b894d44be9ac45ba52e0e82ffa0
parent35373c311207b47b0dc261adab4bcf243f8428db
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>
mm/memory.c