Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8b2d825 authored by Xiubo Li's avatar Xiubo Li Committed by Linus Torvalds
Browse files

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: default avatarXiubo 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ff26f70f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -344,7 +344,7 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
{
{
	int nr_scanned = 0, total_isolated = 0;
	int nr_scanned = 0, total_isolated = 0;
	struct page *cursor, *valid_page = NULL;
	struct page *cursor, *valid_page = NULL;
	unsigned long flags;
	unsigned long flags = 0;
	bool locked = false;
	bool locked = false;
	unsigned long blockpfn = *start_pfn;
	unsigned long blockpfn = *start_pfn;


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