Re: [PATCH v4 12/12] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace
From: Masahiro Yamada
Date: Wed Sep 04 2019 - 04:46:30 EST
On Wed, Sep 4, 2019 at 1:10 AM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> On Tue, Sep 03, 2019 at 04:06:38PM +0100, Matthias Maennich wrote:
> > Modules using symbols from the WATCHDOG_CORE namespace are required to
> > explicitly import the namespace. This patch was generated with the
> > following steps and serves as a reference to use the symbol namespace
> > feature:
> > 1) Use EXPORT_SYMBOL_NS* macros instead of EXPORT_SYMBOL* for symbols
> > in watchdog_core.c
> > 2) make (see warnings during modpost about missing imports)
> > 3) make nsdeps
> > I used 'allmodconfig' for the above steps to ensure all occurrences are
> > patched.
> > Defining DEFAULT_SYMBOL_NAMESPACE in the Makefile is not trivial in this
> > case as not only watchdog_core is defined in drivers/watchdog/Makefile.
> > Hence this patch uses the variant of using the EXPORT_SYMBOL_NS* macros
> > to export into a different namespace.
> > An alternative to this patch would be a single definition line before
> > any use of EXPORT_SYMBOL*:
> > #define DEFAULT_SYMBOL_NAMESPACE WATCHDOG_CORE
> > This patch serves as a reference on how to use the symbol namespaces.
> > Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Matthias Maennich <maennich@xxxxxxxxxx>
> As mentioned before, I am opposed to this set of changes. I don't see
> the point of restricting the use of exported symbols in WATCHDOG_CORE.
I do not like this patch set either.
Anyway, the last two patches (usb-stroage, watchdog)
are useful to demonstrate
that this has a bad taste.