]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/page_alloc: use local variable zone_idx directly
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 16 Sep 2022 07:22:50 +0000 (15:22 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:29 +0000 (14:03 -0700)
Use local variable zone_idx directly since it holds the exact value of
zone_idx().  No functional change intended.

Link: https://lkml.kernel.org/r/20220916072257.9639-10-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c

index c055b4cd37f01084f0714744d0495a199ea562b0..ec865cfd0c3a75d553ee91052f0eb94c7c8efcee 100644 (file)
@@ -6881,7 +6881,7 @@ void __ref memmap_init_zone_device(struct zone *zone,
        unsigned long start = jiffies;
        int nid = pgdat->node_id;
 
-       if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE))
+       if (WARN_ON_ONCE(!pgmap || zone_idx != ZONE_DEVICE))
                return;
 
        /*