Skip to content

Commit fba4eaf

Browse files
Maria Yuakpm00
authored andcommitted
mm/page_isolation: fix clang deadcode warning
When !CONFIG_VM_BUG_ON, there is warning of clang-analyzer-deadcode.DeadStores: Value stored to 'mt' during its initialization is never read. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Maria Yu <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Doug Berger <[email protected]> Cc: Mike Kravetz <[email protected]> Cc: Zi Yan <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent bb2282c commit fba4eaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_isolation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags,
330330
zone->zone_start_pfn);
331331

332332
if (skip_isolation) {
333-
int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));
333+
int mt __maybe_unused = get_pageblock_migratetype(pfn_to_page(isolate_pageblock));
334334

335335
VM_BUG_ON(!is_migrate_isolate(mt));
336336
} else {

0 commit comments

Comments
 (0)