mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 16/16] dyndbg: make ddebug_tables list LIFO for add/remove_module
@ 2019-11-27 17:51 Jim Cromie
  0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2019-11-27 17:51 UTC (permalink / raw)
  To: jbaron, linux-kernel; +Cc: linux, greg, Jim Cromie

loadable modules are the last in, and are the only modules that could
be removed.  ddebug_remove_module() searches from head, but
ddebug_add_module() uses list_add_tail().  Change it to list_add() for
a micro-optimization.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 lib/dynamic_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 82daf95b8f64..99284e775682 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -960,7 +960,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
 	dt->ddebugs = tab;
 
 	mutex_lock(&ddebug_lock);
-	list_add_tail(&dt->link, &ddebug_tables);
+	list_add(&dt->link, &ddebug_tables);
 	mutex_unlock(&ddebug_lock);
 
 	vpr_info("%u debug prints in module %s\n", n, dt->mod_name);
-- 
2.23.0


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

only message in thread, other threads:[~2019-11-27 17:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 17:51 [PATCH 16/16] dyndbg: make ddebug_tables list LIFO for add/remove_module Jim Cromie

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

all inboxes | Powered by JetHome®