mm/page_alloc: Remove redundant pcp->free_count initialization in per_cpu_pages_init()
Subsystems (2)
PATCH 1/1 mm/page_alloc: Remove redundant pcp->free_count initialization in per_cpu_pages_init()
From: Ye Liu <[email protected]>
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)).
--- mm/page_alloc.c | 1 - 1 file changed, 1 deletion(-)
mm/page_alloc.c +0 -1
@@ -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,
Signature · 1 line
2.43.0
Quoted 7 lines · Ye Liu
From: Ye Liu <[email protected]>
In
per_cpu_pages_init(),pcp->free_countis explicitly initialized to 0, but this is redundant because the entire struct is already zeroed bymemset(pcp, 0, sizeof(*pcp)).Signed-off-by Ye Liu <[email protected]>
[heroically,]
Quoted 7 lines · Ye Liu
From: Ye Liu <[email protected]>
In
per_cpu_pages_init(),pcp->free_countis explicitly initialized to 0, but this is redundant because the entire struct is already zeroed bymemset(pcp, 0, sizeof(*pcp)).Signed-off-by Ye Liu <[email protected]>
Quoted 11 lines · Ye Liu
From: Ye Liu <[email protected]>
In
per_cpu_pages_init(),pcp->free_countis explicitly initialized to 0, but this is redundant because the entire struct is already zeroed bymemset(pcp, 0, sizeof(*pcp)).Signed-off-by Ye Liu <[email protected]>--- mm/page_alloc.c | 1 - 1 file changed, 1 deletion(-)
--
Best Regards,
Yan, Zi