[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yd7/sqLNQzl15zQ+@bombadil.infradead.org>
Date: Wed, 12 Jan 2022 08:20:02 -0800
From: Luis Chamberlain <mcgrof@...nel.org>
To: Aaron Tomlin <atomlin@...hat.com>
Cc: cl@...ux.com, pmladek@...e.com, mbenes@...e.cz,
akpm@...ux-foundation.org, jeyu@...nel.org,
linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
atomlin@...mlin.com, ghalat@...hat.com
Subject: Re: [RFC PATCH 11/12] module: Move sysfs support into a separate file
On Tue, Dec 28, 2021 at 09:30:40PM +0000, Aaron Tomlin wrote:
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index 2da580c7b069..354fb2697188 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -1017,7 +1015,7 @@ static ssize_t show_taint(struct module_attribute *mattr,
> static struct module_attribute modinfo_taint =
> __ATTR(taint, 0444, show_taint, NULL);
>
> -static struct module_attribute *modinfo_attrs[] = {
> +struct module_attribute *modinfo_attrs[] = {
> &module_uevent,
> &modinfo_version,
> &modinfo_srcversion,
> @@ -1031,6 +1029,8 @@ static struct module_attribute *modinfo_attrs[] = {
> NULL,
> };
>
> +size_t modinfo_attrs_count = ARRAY_SIZE(modinfo_attrs);
> +
> static const char vermagic[] = VERMAGIC_STRING;
>
> static int try_to_force_load(struct module *mod, const char *reason)
Can't modinfo_attrs and modinfo_attrs_count be left static and moved to
the new file?
Luis
Powered by blists - more mailing lists