[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQAckvYsU_mAuGS=pDzUk=-ZmAN9K45iTLQn0wfaYkDfQ@mail.gmail.com>
Date: Sun, 10 Dec 2023 04:26:31 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: linux-kbuild@...r.kernel.org,
Paul Gortmaker <paul.gortmaker@...driver.com>,
linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] init: move THIS_MODULE from <linux/export.h> to <linux/init.h>
On Tue, Dec 5, 2023 at 2:54 PM Luis Chamberlain <mcgrof@...nel.org> wrote:
>
> On Sun, Nov 26, 2023 at 04:19:14PM +0900, Masahiro Yamada wrote:
> > Commit f50169324df4 ("module.h: split out the EXPORT_SYMBOL into
> > export.h") appropriately separated EXPORT_SYMBOL into <linux/export.h>
> > because modules and EXPORT_SYMBOL are orthogonal; modules are symbol
> > consumers, while EXPORT_SYMBOL are used by symbol providers, which
> > may not be necessarily a module.
> >
> > However, that commit also relocated THIS_MODULE. As explained in the
> > commit description, the intention was to define THIS_MODULE in a
> > lightweight header, but I do not believe <linux/export.h> was the
> > suitable location because EXPORT_SYMBOL and THIS_MODULE are unrelated.
> >
> > Move it to another lightweight header, <linux/init.h>. The reason for
> > choosing <linux/init.h> is to make <linux/moduleparam.h> self-contained
> > without relying on <linux/linkage.h> incorrectly including
> > <linux/export.h>.
> >
> > With this adjustment, the role of <linux/export.h> becomes clearer as
> > it only defines EXPORT_SYMBOL.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>
> Reviewed-by: Luis Chamberlain <mcgrof@...nel.org>
I will fold your reviewed-by tag.
Thanks.
>
> Do you want this this to go through modules-next or your tree? I'm fine
> it goes either way.
>
> Luis
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists