]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Sat, 13 Sep 2025 23:55:02 +0000 (16:55 -0700)
commit5922deb3ecc0e3c6027e4779e00d2505ebeba9df
tree70ff3338d403386d9729dfe797953b39cbf59e5f
parente4fe1388dfbdd9641331071cd9b4a9efa16da34d
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