aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorJim Cromie <[email protected]>2020-07-19 23:10:50 +0000
committerGreg Kroah-Hartman <[email protected]>2020-07-24 15:00:09 +0000
commit47e9f5a82329696b31e7e0672653954f6e9b0f54 (patch)
treeb331745383a9e0d0ffc7f28b3385f7dda59c8622 /lib/dynamic_debug.c
parentdyndbg: prefer declarative init in caller, to memset in callee (diff)
downloadkernel-47e9f5a82329696b31e7e0672653954f6e9b0f54.tar.gz
kernel-47e9f5a82329696b31e7e0672653954f6e9b0f54.zip
dyndbg: make ddebug_tables list LIFO for add/remove_module
loadable modules are the last in on this list, 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. Acked-by: <[email protected]> Signed-off-by: Jim Cromie <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
-rw-r--r--lib/dynamic_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index da3ed54a6521..e879af4e66e0 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -895,7 +895,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);
v2pr_info("%u debug prints in module %s\n", n, dt->mod_name);