[PATCH 63/65] dyndbg: change ddebug_class_user.user_mod_name to .mod_name

Jim Cromie jim.cromie at gmail.com
Tue Oct 1 19:34:52 UTC 2024


Change struct ddebug_class_user fieldname from user_mod_name to
mod_name.  This harmonizes names with ddebug_class_map, eliminating a
distinction without a difference.  It may also improve the usability
of several macros.

Signed-off-by: Jim Cromie <jim.cromie at gmail.com>
---
 include/linux/dynamic_debug.h |  4 ++--
 lib/dynamic_debug.c           | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index 62aadd2f4706..59b584e676be 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -147,7 +147,7 @@ struct ddebug_class_map {
 	}
 
 struct ddebug_class_user {
-	char *user_mod_name;
+	char *mod_name;
 	struct ddebug_class_map *map;
 };
 
@@ -165,7 +165,7 @@ struct ddebug_class_user {
 	extern struct ddebug_class_map _var;				\
 	static struct ddebug_class_user __aligned(8) __used		\
 	__section("__dyndbg_class_users") _uname = {			\
-		.user_mod_name = KBUILD_MODNAME,			\
+		.mod_name = KBUILD_MODNAME,				\
 		.map = &(_var),						\
 	}
 
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index f7928c29a00b..343a6d50905f 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -175,7 +175,7 @@ static int ddebug_find_valid_class(struct ddebug_table const *dt, const char *cl
 		idx = match_string(cli->map->class_names, cli->map->length, class_string);
 		if (idx >= 0) {
 			vpr_dt_info(dt, "class-ref: %s.%s ",
-				    cli->user_mod_name, class_string);
+				    cli->mod_name, class_string);
 			return idx + cli->map->base;
 		}
 	}
@@ -1308,12 +1308,12 @@ static int ddebug_attach_user_module_classes(struct ddebug_table *dt,
 	 */
 	for (i = 0, cli = di->class_users; i < di->num_class_users; i++, cli++) {
 
-		if (WARN_ON_ONCE(!cli || !cli->map || !cli->user_mod_name))
+		if (WARN_ON_ONCE(!cli || !cli->map || !cli->mod_name))
 			continue;
 
-		if (!strcmp(cli->user_mod_name, dt->mod_name)) {
+		if (!strcmp(cli->mod_name, dt->mod_name)) {
 			vpr_cm_info(cli->map, "class_ref[%d] %s -> %s", i,
-				    cli->user_mod_name, cli->map->mod_name);
+				    cli->mod_name, cli->map->mod_name);
 			if (!nc++)
 				dt->class_users = cli;
 		}
@@ -1327,7 +1327,7 @@ static int ddebug_attach_user_module_classes(struct ddebug_table *dt,
 	for (i = 0, cli = dt->class_users; i < dt->num_class_users; i++, cli++) {
 		if (ddebug_class_range_overlap(cli->map, reserved_ids))
 			return -EINVAL;
-		ddebug_apply_params(cli->map, cli->user_mod_name);
+		ddebug_apply_params(cli->map, cli->mod_name);
 	}
 	vpr_dt_info(dt, "attach-client-module: ");
 	return 0;
-- 
2.46.2



More information about the Intel-gfx-trybot mailing list