From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Matthias Maennich <maennich@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Masahiro Yamada <masahiroy@kernel.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes
Date: Thu, 5 Dec 2024 21:21:02 +0200 [thread overview]
Message-ID: <Z1H9Hpj-uK6-l9yA@smile.fi.intel.com> (raw)
In-Reply-To: <td6actwt6wzbutyo6ujv5wmpoieyovtbpqqcmq45twfzhwyca3@hpybcti24ndw>
On Thu, Dec 05, 2024 at 12:21:26PM +0100, Uwe Kleine-König wrote:
> Hello Andy,
>
> On Thu, Dec 05, 2024 at 09:52:13AM +0200, Andy Shevchenko wrote:
> > On Wed, Dec 04, 2024 at 11:01:11AM +0100, Uwe Kleine-König wrote:
> > > The definition of EXPORT_SYMBOL et al depends on
> > > DEFAULT_SYMBOL_NAMESPACE. So DEFAULT_SYMBOL_NAMESPACE must already be
> > > available when <linux/export.h> is parsed.
> >
> > > -within the corresponding compilation unit before any EXPORT_SYMBOL macro is
> > > -used.
> > > +within the corresponding compilation unit before the #include for
> > > +<linux/export.h>.
> >
> > And how do I know where it is included in the current state of affairs with the
> > dependency hell in the kernel?
> >
> > I suggest to reword it to something like "before any global inclusions", the
> > best probably is to repeat the piece from pr_fmt() / dev_fmt() documentation
> > (if any).
>
> Well, "before <linux/export.h>" is the accurate thing you have to
> ensure. "before any global inclusion" is the safe and easy thing to do
> to achieve that. Maybe:
>
> ...
> within the corresponding compilation unit before the #include for
> <linux/export.h>. Typically it's placed before the first
> #include.
The below is excerpt for pr_fmt():
---8>----
Besides being more concise than the equivalent printk() calls, they can use a
common definition for the format string through the pr_fmt() macro. For
instance, defining this at the top of a source file (before any ``#include``
directive)::
#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__
---8>----
> ?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2024-12-05 19:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 10:01 [PATCH 0/2] doc: module: Two clearifications Uwe Kleine-König
2024-12-04 10:01 ` [PATCH 1/2] doc: module: Fix documented type of namespace Uwe Kleine-König
2024-12-04 10:38 ` Jani Nikula
2024-12-05 3:58 ` Masahiro Yamada
2024-12-05 7:50 ` Andy Shevchenko
2024-12-05 10:55 ` Uwe Kleine-König
2024-12-05 19:04 ` Andy Shevchenko
2024-12-06 14:45 ` Uwe Kleine-König
2024-12-06 15:21 ` Andy Shevchenko
2024-12-30 10:45 ` Masahiro Yamada
2024-12-04 10:01 ` [PATCH 2/2] doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes Uwe Kleine-König
2024-12-05 7:52 ` Andy Shevchenko
2024-12-05 11:21 ` Uwe Kleine-König
2024-12-05 19:21 ` Andy Shevchenko [this message]
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=Z1H9Hpj-uK6-l9yA@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maennich@google.com \
--cc=masahiroy@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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
all inboxes | Powered by JetHome®