On Fri, 13 Mar 2026 07:19:47 -0600, Jim Cromie <[email protected]> wrote:
> diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
> index 80160028461a..74ed18a038bd 100644
> --- a/include/linux/dynamic_debug.h
> +++ b/include/linux/dynamic_debug.h
> @@ -81,10 +84,18 @@ struct _ddebug_class_map {
>       enum ddebug_class_map_type map_type;
>  };
>  
> +struct _ddebug_class_user {
> +     char *mod_name;
> +     struct _ddebug_class_map *map;
> +     const int offset;       /* user offset to re-number the used map */
> +};

Is it usefull at this point?

> @@ -137,6 +223,25 @@ struct _ddebug_class_param {
> [ ... skip 14 lines ... ]
> +     extern struct _ddebug_class_map _var;                           \
> +     static struct _ddebug_class_user __aligned(8) __used            \
> +     __section("__dyndbg_class_users") _uname = {                    \
> +             .mod_name = KBUILD_MODNAME,                             \
> +             .map = &(_var),                                         \
> +             .offset = _offset                                       \

I think this offset is useless at this point, or did I miss something?

>
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index e8ffc2b5b330..66f4bfe39e89 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -1190,6 +1292,22 @@ static void ddebug_attach_module_classes(struct 
> ddebug_table *dt, struct _ddebug
> [ ... skip 13 lines ... ]
> +             return -EINVAL;
> +     }
> +     *reserved_ids |= range;
> +     return 0;
> +}
> +

Can you introduce this function when it is used?

-- 
Louis Chauvet <[email protected]>

Reply via email to