Skip to contentSkip to conversation

for-5.9rc1 dyndbg fixes

PATCH New Jim Cromie 1 participant 3 messages Aug 14, 2020

Subsystems (2)
lore
Share & tools
lore

Jim Cromie

author maintainer
#0 lore raw

cover for-5.9rc1 dyndbg fixes

2 items for v5.9-rc1
fix sparse complaint about exported ddebug_exec_queries fixed width format %3u

Jim Cromie (2):
dyndbg: add decl for exported ddebug_exec_queries()
dyndbg: give %3u width in pr-format, cosmetic only

 include/linux/dynamic_debug.h | 3 +++
 lib/dynamic_debug.c           | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.26.2
author maintainer
#1 lore raw

PATCH 1/2 dyndbg: add decl for exported ddebug_exec_queries()

59cf47e7df31 dyndbg: export ddebug_exec_queries

elicited a sparse complaint. Add declaration to header file.

I skipped the kerneldoc for now, unsure where it should go. Ive seen it in .c files, Im leaning that way.

---
 include/linux/dynamic_debug.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/dynamic_debug.h +3 -0
index aa9ff9e1c0b3..61eb80c726bf 100644
@@ -6,6 +6,9 @@
 #include <linux/jump_label.h>
 #endif
 
+/* exported for module authors to exercise >control */
+int ddebug_exec_queries(char *query, const char *modname);
+
 /*
  * An instance of this structure is created in a special
  * ELF section at every dynamic debug callsite.  At runtime,
Signature · 1 line
2.26.2
author maintainer
#2 lore raw

PATCH 2/2 dyndbg: give %3u width in pr-format, cosmetic only

In reply to Jim Cromie

Specify the print-width so log entries line up nicely.

no functional changes.

---
 lib/dynamic_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/dynamic_debug.c +1 -1
index 1d012e597cc3..01b7d0210412 100644
@@ -947,7 +947,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n,
 	list_add(&dt->link, &ddebug_tables);
 	mutex_unlock(&ddebug_lock);
 
-	v2pr_info("%u debug prints in module %s\n", n, dt->mod_name);
+	v2pr_info("%3u debug prints in module %s\n", n, dt->mod_name);
 	return 0;
 }
 
Signature · 1 line
2.26.2