From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: Matthias Maennich <maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Tomer Maimon <tmaimon77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org,
linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Michal Simek
<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
Ludovic Desroches
<ludovic.desroches-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>,
mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org,
NXP Linux Team <linux-imx-3arQi8VN3Tc@public.gmane.org>,
Tomas Winkler
<tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Jean Delvare <jdelvare-IBi9RG/b67k@public.gmane.org>,
Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
michal.lkml-yyZNWGI4GtDR7s880joybQ@public.gmane.org,
Scott Branden <sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
Andrew Jeffery <andrew-zrmu5oMJ5Fs@public.gmane.org>,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Pengutronix Kernel Team
<kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org,
Thierry Reding <thierry.redin>
Subject: Re: [PATCH v3 11/11] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace
Date: Wed, 21 Aug 2019 07:59:11 -0700 [thread overview]
Message-ID: <20190821145911.GA6521@roeck-us.net> (raw)
In-Reply-To: <20190821114955.12788-12-maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
On Wed, Aug 21, 2019 at 12:49:26PM +0100, Matthias Maennich wrote:
> Modules using these symbols 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.
>
I don't have the context, and thus I am missing the point of this patch
set. Whatever it is supposed to accomplish, it seems extreme to me
to require extra code in each driver for it.
Anyway, WATCHDOG_CORE would be the default namespace (if it is what
I think it is) for watchdog drivers, even though not all watchdog drivers
use it. As such, I am missing an explanation why defining it in Makefile
is not trivial. "... as not only watchdog_core is defined in
drivers/watchdog/Makefile" does not mean anything to me and is not a real
explanation. Also, it is not immediately obvious to me why "select
WATCHDOG_CORE" in Kconfig would not automatically imply that WATCHDOG_CORE
is used by a given driver, and why it is impossible to use that
information to avoid the per-driver changes.
I am also missing an explanation why WATCHDOG_CORE is going to be a
separate namespace to start with. Maybe that discussion has happened,
but I don't recall being advised or asked or told about it. Are we also
going to have a new HWMON_CORE namespace ? And the same for each other
subsystem in the kernel ?
Since this is being added to the watchdog API, it will have to be
documented accordingly. Watchdog driver writers, both inside and outside
the watchdog subsystem, will need to know that they now have to add an
additional boilerplate declaration into their drivers.
Last but not least, combining patches affecting multiple subsystems in a
single patch will make it difficult to apply and will likely result in
conflicts. Personally I would prefer a split into one patch per affected
subsystem. Also, please keep in mind that new pending watchdog drivers
won't have the new boilerplate.
Thanks,
Guenter
next prev parent reply other threads:[~2019-08-21 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190813121733.52480-1-maennich@google.com>
[not found] ` <20190813121733.52480-1-maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2019-08-21 11:49 ` [PATCH v3 00/11] Symbol Namespaces Matthias Maennich
[not found] ` <20190821114955.12788-1-maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2019-08-21 11:49 ` [PATCH v3 11/11] RFC: watchdog: export core symbols in WATCHDOG_CORE namespace Matthias Maennich
[not found] ` <20190821114955.12788-12-maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2019-08-21 12:39 ` Greg KH
2019-08-21 14:59 ` Guenter Roeck [this message]
[not found] ` <20190821145911.GA6521-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2019-08-21 16:28 ` Matthias Maennich
2019-08-21 12:46 ` [PATCH v3 00/11] Symbol Namespaces Nicolas Pitre
[not found] ` <nycvar.YSQ.7.76.1908210840490.19480-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2019-08-21 13:37 ` Greg KH
[not found] ` <20190821133737.GB4890-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2019-08-21 20:48 ` Nicolas Pitre
2019-08-21 13:11 ` Peter Zijlstra
[not found] ` <20190821131140.GC2349-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2019-08-21 13:38 ` Greg KH
[not found] ` <20190821133846.GC4890-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2019-08-21 14:03 ` Matthias Maennich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190821145911.GA6521@roeck-us.net \
--to=linux-0h96xk9xttrk1umjsbkqmq@public.gmane.org \
--cc=alexandre.belloni-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=andrew-zrmu5oMJ5Fs@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jdelvare-IBi9RG/b67k@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-imx-3arQi8VN3Tc@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-stm32-XDFAJ8BFU24N7RejjzZ/Li2xQDfSxrLKVpNB7YpNyf8@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lucas.de.marchi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ludovic.desroches-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org \
--cc=maennich-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=michal.lkml-yyZNWGI4GtDR7s880joybQ@public.gmane.org \
--cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tmaimon77-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).