[tip: core/debugobjects] debugobjects: Remove pointless hlist initialization

tip-bot2 for Thomas Gleixner posted 1 patch 1 month, 1 week ago
lib/debugobjects.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
[tip: core/debugobjects] debugobjects: Remove pointless hlist initialization
Posted by tip-bot2 for Thomas Gleixner 1 month, 1 week ago
The following commit has been merged into the core/debugobjects branch of tip:

Commit-ID:     3f397bf9553d9f142fbfaa19713e0350803fcc31
Gitweb:        https://git.kernel.org/tip/3f397bf9553d9f142fbfaa19713e0350803fcc31
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Mon, 07 Oct 2024 18:49:56 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 15 Oct 2024 17:30:30 +02:00

debugobjects: Remove pointless hlist initialization

It's BSS zero initialized.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/all/20241007164913.200379308@linutronix.de

---
 lib/debugobjects.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 1f6bf0f..9867412 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -1364,20 +1364,11 @@ free:
 void __init debug_objects_mem_init(void)
 {
 	struct kmem_cache *cache;
-	int cpu, extras;
+	int extras;
 
 	if (!debug_objects_enabled)
 		return;
 
-	/*
-	 * Initialize the percpu object pools
-	 *
-	 * Initialization is not strictly necessary, but was done for
-	 * completeness.
-	 */
-	for_each_possible_cpu(cpu)
-		INIT_HLIST_HEAD(&per_cpu(percpu_obj_pool.free_objs, cpu));
-
 	if (!debug_objects_selftest())
 		return;