Commit 5922deb3 authored by Ye Liu's avatar Ye Liu Committed by Andrew Morton
Browse files

mm/page_alloc: remove redundant pcp->free_count initialization in per_cpu_pages_init()

In per_cpu_pages_init(), pcp->free_count is explicitly initialized to 0,
but this is redundant because the entire struct is already zeroed by
memset(pcp, 0, sizeof(*pcp)).

Link: https://lkml.kernel.org/r/20250814071828.12036-1-ye.liu@linux.dev


Signed-off-by: default avatarYe Liu <liuye@kylinos.cn>
Reviewed-by: default avatarBrendan Jackman <jackmanb@google.com>
Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarZi Yan <ziy@nvidia.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e4fe1388
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5946,7 +5946,6 @@ static void per_cpu_pages_init(struct per_cpu_pages *pcp, struct per_cpu_zonesta
	pcp->high_min = BOOT_PAGESET_HIGH;
	pcp->high_max = BOOT_PAGESET_HIGH;
	pcp->batch = BOOT_PAGESET_BATCH;
	pcp->free_count = 0;
}

static void __zone_set_pageset_high_and_batch(struct zone *zone, unsigned long high_min,