[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6FaEoAAFFP0WqK3@kroah.com>
Date: Tue, 20 Dec 2022 07:45:38 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Allen Webb <allenwebb@...gle.com>
Cc: "linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v9 05/10] module.h: MODULE_DEVICE_TABLE for built-in
modules
On Mon, Dec 19, 2022 at 02:46:13PM -0600, Allen Webb wrote:
> Implement MODULE_DEVICE_TABLE for build-in modules to make it possible
> to generate a builtin.alias file to complement modules.alias.
>
> Signed-off-by: Allen Webb <allenwebb@...gle.com>
> ---
> include/linux/module.h | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/module.h b/include/linux/module.h
> index ec61fb53979a..3d1b04ca6350 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -243,7 +243,20 @@ extern void cleanup_module(void);
> extern typeof(name) __mod_##type##__##name##_device_table \
> __attribute__ ((unused, alias(__stringify(name))))
> #else /* !MODULE */
> -#define MODULE_DEVICE_TABLE(type, name)
> +/*
> + * The names may not be unique for built-in modules, so include the module name
> + * to guarantee uniqueness.
What "names" are you referring to here with the words, "The names"?
And built-in modules have the same rules as external names, they have to
be unique so I do not understand the problem you are trying to solve
here, which means you need to describe it better in both the changelog
text and the comment.
> + *
> + * Note that extern is needed because modpost reads these symbols to generate
> + * modalias entries for each match id in each device table. They are not used
> + * at runtime.
This comment isn't explaining much about what the #define is to be used
for, is it?
confused,
greg k-h
Powered by blists - more mailing lists