]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/page_alloc: remove redundant pcp->free_count initialization in per_cpu_pages_init()
authorYe Liu <liuye@kylinos.cn>
Thu, 14 Aug 2025 07:18:28 +0000 (15:18 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 18 Aug 2025 05:08:43 +0000 (22:08 -0700)
commite9891bd0c1f2279b51bc3202ff6c741d68a7c534
tree19b50041976c4730dd234034bf57ed2b110af064
parent6f5d8f9ad52bbaa08ec1916448195bcc3dfb41d9
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: Ye Liu <liuye@kylinos.cn>
Reviewed-by: Brendan Jackman <jackmanb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c