From: Maria Yu Date: Fri, 21 Oct 2022 10:15:55 +0000 (+0800) Subject: mm/page_isolation: fix clang deadcode warning X-Git-Tag: v6.6.17~6269^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fba4eaf93164a6a6eb3cc12a3391b06f6187aa20;p=platform%2Fkernel%2Flinux-rpi.git 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/20221021101555.7992-2-quic_aiquny@quicinc.com Signed-off-by: Maria Yu Cc: David Hildenbrand Cc: Doug Berger Cc: Mike Kravetz Cc: Zi Yan Cc: Matthew Wilcox Signed-off-by: Andrew Morton --- diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 04141a9..47fbc16 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -330,7 +330,7 @@ static int isolate_single_pageblock(unsigned long boundary_pfn, int flags, zone->zone_start_pfn); if (skip_isolation) { - int mt = get_pageblock_migratetype(pfn_to_page(isolate_pageblock)); + int mt __maybe_unused = get_pageblock_migratetype(pfn_to_page(isolate_pageblock)); VM_BUG_ON(!is_migrate_isolate(mt)); } else {