[PATCH 13/63] dyndbg: reduce verbose=3 messages in ddebug_add_module

Jim Cromie posted 63 patches 1 year ago
There is a newer version of this series
[PATCH 13/63] dyndbg: reduce verbose=3 messages in ddebug_add_module
Posted by Jim Cromie 1 year ago
When modprobing a module, dyndbg currently logs/says "add-module", and
then "skipping" if the module has no prdbgs.  Instead just check 1st
and return quietly.

no functional change

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

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index fc9bf5d80aa9..6bac5703dd41 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1245,11 +1245,10 @@ static int ddebug_add_module(struct _ddebug_info *di, const char *modname)
 {
 	struct ddebug_table *dt;
 
-	v3pr_info("add-module: %s.%d sites\n", modname, di->num_descs);
-	if (!di->num_descs) {
-		v3pr_info(" skip %s\n", modname);
+	if (!di->num_descs)
 		return 0;
-	}
+
+	v3pr_info("add-module: %s %d sites\n", modname, di->num_descs);
 
 	dt = kzalloc(sizeof(*dt), GFP_KERNEL);
 	if (dt == NULL) {
-- 
2.48.1
Re: [PATCH 13/63] dyndbg: reduce verbose=3 messages in ddebug_add_module
Posted by Louis Chauvet 11 months, 2 weeks ago

Le 25/01/2025 à 07:45, Jim Cromie a écrit :
> When modprobing a module, dyndbg currently logs/says "add-module", and
> then "skipping" if the module has no prdbgs.  Instead just check 1st
> and return quietly.
> 
> no functional change
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>

> ---
>   lib/dynamic_debug.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index fc9bf5d80aa9..6bac5703dd41 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -1245,11 +1245,10 @@ static int ddebug_add_module(struct _ddebug_info *di, const char *modname)
>   {
>   	struct ddebug_table *dt;
>   
> -	v3pr_info("add-module: %s.%d sites\n", modname, di->num_descs);
> -	if (!di->num_descs) {
> -		v3pr_info(" skip %s\n", modname);
> +	if (!di->num_descs)
>   		return 0;
> -	}
> +
> +	v3pr_info("add-module: %s %d sites\n", modname, di->num_descs);
>   
>   	dt = kzalloc(sizeof(*dt), GFP_KERNEL);
>   	if (dt == NULL) {

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com