aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiaohe Lin <[email protected]>2022-09-16 15:22:50 +0800
committerAndrew Morton <[email protected]>2022-10-03 14:03:29 -0700
commitc035290424a9b7b64477752058b460d0ecc21987 (patch)
treed3b881821994278eae95ebe185d1d11e7c971ffd
parentb36184553d41c59e6712f9d4699aca24577fbd4a (diff)
mm/page_alloc: use local variable zone_idx directly
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/[email protected] Signed-off-by: Miaohe Lin <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: Oscar Salvador <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c055b4cd37f0..ec865cfd0c3a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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;
/*