Skip to contentSkip to conversation

kdb: remove redundant memset in kdb_initbptab()

PATCH New Sang-Heon Jeon 1 participant 1 message Oct 23 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kdb: remove redundant memset in kdb_initbptab()

kdb_breakpoints is zero-initialized and not used until kdb_initbptab(), which only runs once during boot. So the memset in kdb_initbptab() has no effect.

So remove the memset.

No functional change.

---
 kernel/debug/kdb/kdb_bp.c | 2 --
 1 file changed, 2 deletions(-)
kernel/debug/kdb/kdb_bp.c +0 -2
index c0c2072f5452..d3a6f865e953 100644
@@ -582,8 +582,6 @@ void __init kdb_initbptab(void)
 	/*
 	 * First time initialization.
 	 */
-	memset(&kdb_breakpoints, '\0', sizeof(kdb_breakpoints));
-
 	for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++)
 		bp->bp_free = 1;
 

base-commit: fdbdd0ccb30af18d3b29e714ac8d5ab6163279e0

Signature · 1 line
2.43.0