lkml.org 
[lkml]   [2021]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting
Date
On qemu --smp 3 runs, remove-module can get called 3 times.
So don't print on entry; instead print "removed" after entry is
found and removed, so just once.

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

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 9dd8efb5a756..bc1ac55ac328 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1028,8 +1028,6 @@ int ddebug_remove_module(const char *mod_name)
struct ddebug_table *dt, *nextdt;
int ret = -ENOENT;

- v2pr_info("removing module \"%s\"\n", mod_name);
-
mutex_lock(&ddebug_lock);
list_for_each_entry_safe(dt, nextdt, &ddebug_tables, link) {
if (dt->mod_name == mod_name) {
@@ -1039,6 +1037,8 @@ int ddebug_remove_module(const char *mod_name)
}
}
mutex_unlock(&ddebug_lock);
+ if (!ret)
+ v2pr_info("removed module \"%s\"\n", mod_name);
return ret;
}

--
2.31.1
\
 
 \ /
  Last update: 2021-10-14 00:09    [W:0.052 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site