]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm-compaction-avoid-rescanning-pageblocks-in-isolate_freepages-fix
authorVlastimil Babka <vbabka@suse.cz>
Thu, 22 May 2014 00:43:14 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:43:14 +0000 (10:43 +1000)
commitdc2a783cedddaeffce6c43e195200ca6f1c8177d
treeaa46898754d5a457e310b8a088ff9186701bb597
parent62eff82d4ee474eb9a59567f604364e0ba699472
mm-compaction-avoid-rescanning-pageblocks-in-isolate_freepages-fix

Fix a (spurious) build warning:

mm/compaction.c:860:15: warning: `next_free_pfn' may be used uninitialized in this function [-Wmaybe-uninitialized]

Seems like the compiler cannot prove that exiting the for loop without
updating next_free_pfn there will mean that the check for crossing the
scanners will trigger.  So let's not confuse people who try to see why
this warning occurs.

Instead of initializing next_free_pfn to zero with an explaining comment,
just drop the damned variable altogether and work with cc->free_pfn
directly as Nayoa originally suggested.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Suggested-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c