Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/mm_init: remove redundant memset in free_area_init()
@ 2026-07-20 15:09 Sang-Heon Jeon
  0 siblings, 0 replies; only message in thread
From: Sang-Heon Jeon @ 2026-07-20 15:09 UTC (permalink / raw)
  To: Mike Rapoport, Andrew Morton; +Cc: Sang-Heon Jeon, linux-kernel, linux-mm

zone_movable_pfn is zero-initialized and only set by
find_zone_movable_pfns_for_nodes(), which runs once during boot right
after the memset, so the memset has no effect.

Remove redundant memset. No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 mm/mm_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index 711f821f7b3c..144bb4042942 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1844,7 +1844,6 @@ static void __init free_area_init(void)
 	}
 
 	/* Find the PFNs that ZONE_MOVABLE begins at in each node */
-	memset(zone_movable_pfn, 0, sizeof(zone_movable_pfn));
 	find_zone_movable_pfns_for_nodes();
 
 	/* Print out the zone ranges */
-- 
2.43.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-20 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 15:09 [PATCH] mm/mm_init: remove redundant memset in free_area_init() Sang-Heon Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox