All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] dynamic debug for -next
@ 2021-10-13 22:07 Jim Cromie
  2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jim Cromie @ 2021-10-13 22:07 UTC (permalink / raw)
  To: jbaron, gregkh, linux-kernel; +Cc: Jim Cromie

hi Greg, Jason,

This cleans up the previous 1-5, dropping the unwanted 2

Jim Cromie (3):
  dyndbg: fix spurious log-level change
  dyndbg: vpr-info on remove-module complete, not starting
  dyndbg: no vpr-info on empty queries

 lib/dynamic_debug.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] dyndbg: fix spurious log-level change
  2021-10-13 22:07 [PATCH 0/3] dynamic debug for -next Jim Cromie
@ 2021-10-13 22:07 ` Jim Cromie
  2021-10-14  8:58   ` Greg KH
  2021-10-13 22:07 ` [PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting Jim Cromie
  2021-10-13 22:07 ` [PATCH 3/3] dyndbg: no vpr-info on empty queries Jim Cromie
  2 siblings, 1 reply; 6+ messages in thread
From: Jim Cromie @ 2021-10-13 22:07 UTC (permalink / raw)
  To: jbaron, gregkh, linux-kernel; +Cc: Jim Cromie

HEAD~recent inadvertently altered a message's verbosity from 1 to 2, restore it.

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 dfe1e6a857bc..9dd8efb5a756 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -529,7 +529,7 @@ static int ddebug_exec_queries(char *query, const char *modname)
 		if (!query || !*query || *query == '#')
 			continue;
 
-		v2pr_info("query %d: \"%s\" mod:%s\n", i, query, modname ?: "*");
+		vpr_info("query %d: \"%s\" mod:%s\n", i, query, modname ?: "*");
 
 		rc = ddebug_exec_query(query, modname);
 		if (rc < 0) {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting
  2021-10-13 22:07 [PATCH 0/3] dynamic debug for -next Jim Cromie
  2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
@ 2021-10-13 22:07 ` Jim Cromie
  2021-10-13 22:07 ` [PATCH 3/3] dyndbg: no vpr-info on empty queries Jim Cromie
  2 siblings, 0 replies; 6+ messages in thread
From: Jim Cromie @ 2021-10-13 22:07 UTC (permalink / raw)
  To: jbaron, gregkh, linux-kernel; +Cc: Jim Cromie

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] dyndbg: no vpr-info on empty queries
  2021-10-13 22:07 [PATCH 0/3] dynamic debug for -next Jim Cromie
  2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
  2021-10-13 22:07 ` [PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting Jim Cromie
@ 2021-10-13 22:07 ` Jim Cromie
  2 siblings, 0 replies; 6+ messages in thread
From: Jim Cromie @ 2021-10-13 22:07 UTC (permalink / raw)
  To: jbaron, gregkh, linux-kernel; +Cc: Jim Cromie

when `echo $cmd > control` contains multiple queries, extra query
separators (;\n) can parse as empty statements.  This is normal, and a
vpr-info on an empty command is just noise.

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

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index bc1ac55ac328..7744c787e256 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -540,8 +540,10 @@ static int ddebug_exec_queries(char *query, const char *modname)
 		}
 		i++;
 	}
-	vpr_info("processed %d queries, with %d matches, %d errs\n",
-		 i, nfound, errs);
+
+	if (i)
+		vpr_info("processed %d queries, with %d matches, %d errs\n",
+			 i, nfound, errs);
 
 	if (exitcode)
 		return exitcode;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] dyndbg: fix spurious log-level change
  2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
@ 2021-10-14  8:58   ` Greg KH
  2021-10-14 22:36     ` [PATCH 1/1] dyndbg: fix spurious vNpr_info change Jim Cromie
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2021-10-14  8:58 UTC (permalink / raw)
  To: Jim Cromie; +Cc: jbaron, linux-kernel

On Wed, Oct 13, 2021 at 04:07:24PM -0600, Jim Cromie wrote:
> HEAD~recent inadvertently altered a message's verbosity from 1 to 2, restore it.

I do not understand this changelog text at all.

And always wrap your changelog text at 72 columns, like your editor is
asking you to.

> 
> Signed-off-By: Jim Cromie <jim.cromie@gmail.com>

Please put a proper "Fixes:" tag in here.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] dyndbg: fix spurious vNpr_info change
  2021-10-14  8:58   ` Greg KH
@ 2021-10-14 22:36     ` Jim Cromie
  0 siblings, 0 replies; 6+ messages in thread
From: Jim Cromie @ 2021-10-14 22:36 UTC (permalink / raw)
  To: jbaron, gregkh, linux-kernel; +Cc: Jim Cromie

The cited commit inadvertently altered the verbose level of a
vpr_info, restore it to original.

Fixes: 216a0fc40897 ("dyndbg: show module in vpr-info in dd-exec-queries")
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 dfe1e6a857bc..9dd8efb5a756 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -529,7 +529,7 @@ static int ddebug_exec_queries(char *query, const char *modname)
 		if (!query || !*query || *query == '#')
 			continue;
 
-		v2pr_info("query %d: \"%s\" mod:%s\n", i, query, modname ?: "*");
+		vpr_info("query %d: \"%s\" mod:%s\n", i, query, modname ?: "*");
 
 		rc = ddebug_exec_query(query, modname);
 		if (rc < 0) {
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-14 22:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 22:07 [PATCH 0/3] dynamic debug for -next Jim Cromie
2021-10-13 22:07 ` [PATCH 1/3] dyndbg: fix spurious log-level change Jim Cromie
2021-10-14  8:58   ` Greg KH
2021-10-14 22:36     ` [PATCH 1/1] dyndbg: fix spurious vNpr_info change Jim Cromie
2021-10-13 22:07 ` [PATCH 2/3] dyndbg: vpr-info on remove-module complete, not starting Jim Cromie
2021-10-13 22:07 ` [PATCH 3/3] dyndbg: no vpr-info on empty queries Jim Cromie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.