Skip to content

Commit b8b2d82

Browse files
Xiubo Litorvalds
authored andcommitted
mm/compaction.c: fix warning of 'flags' may be used uninitialized
C mm/compaction.o mm/compaction.c: In function isolate_freepages_block: mm/compaction.c:364:37: warning: flags may be used uninitialized in this function [-Wmaybe-uninitialized] && compact_unlock_should_abort(&cc->zone->lock, flags, ^ Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: David Rientjes <rientjes@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ff26f70 commit b8b2d82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/compaction.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
344344
{
345345
int nr_scanned = 0, total_isolated = 0;
346346
struct page *cursor, *valid_page = NULL;
347-
unsigned long flags;
347+
unsigned long flags = 0;
348348
bool locked = false;
349349
unsigned long blockpfn = *start_pfn;
350350

@@ -570,7 +570,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
570570
unsigned long nr_scanned = 0, nr_isolated = 0;
571571
struct list_head *migratelist = &cc->migratepages;
572572
struct lruvec *lruvec;
573-
unsigned long flags;
573+
unsigned long flags = 0;
574574
bool locked = false;
575575
struct page *page = NULL, *valid_page = NULL;
576576

0 commit comments

Comments
 (0)