public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: andi.shyti@kernel.org, masahiroy@kernel.org,
	u.kleine-koenig@baylibre.com, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH] module: Allow DEFAULT_SYMBOL_NAMESPACE be set after export.h included
Date: Sun, 29 Dec 2024 08:25:24 +0000	[thread overview]
Message-ID: <20241229082524.41494308@dsl-u17-10> (raw)
In-Reply-To: <Z3Bv6YhZMAzSLcyg@smile.fi.intel.com>

On Sat, 28 Dec 2024 23:38:49 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Sat, Dec 28, 2024 at 06:43:28PM +0000, David Laight wrote:
> > Commit ceb8bf2ceaa77 ("module: Convert default symbol namespace to string
> > literal") changed DEFAULT_SYMBOL_NAMESPACE to be a string literal.
> > However the conditional definition of _EXPORT_SYMBOL() was left in.
> > 
> > Instead just default DEFAULT_SYMBOL_NAMESPACE to "" and remove the
> > extra _EXPORT_SYMBOL() wrapper.
> > 
> > This lets DEFAULT_SYMBOL_NAMESPACE be defined after export.h is included.  
> 
> > Fixes fd57a3325a779 ("i2c: designware: Move exports to I2C_DW namespaces")  
> 
> Incorrect format, and this should be a tag.

Except that it doesn't want to be picked up by the back-port bots.
At least not in this form - since the changes to export.h that remove
the __stringify() don't really want back-porting.

> 
> ...
> 
> This patch in a different form had been already submitted by Uwe.

Did that move the DEFAULT_SYMBOL_NAMESPACE define to the top of the file?
That can be back-ported provided the " are removed.

The simplification to export.h (which is what I was trying to do)
can then be done after the other patches.

> So, guys, fix
> the documentation or clarify it and when you agree on the approach, choose the
> patch to review. No Ack till that. Andi, FYI.
> 

I had another thought overnight - which is more changes.
Instead of using DEFAULT_SYMBOL_NAMESPACE in EXPORT_SYMBOL() use it as
a default for EXPORT_SYMBOL_NS().
So you have something like:
#define EXPORT_SYMBOL_NS(sym, ...) _EXPORT_SYMBOL_NS(sym, __VA_ARGS__, DEFAULT_SYMBOL_NAMESPACE)
#define _EXPORT_SYMBOL_NS(sym, ns, ...) __EXPORT_SYMBOL(sym, "", ns)

That requires that all the EXPORT_SYMBOL(sym) in files that define DEFAULT_SYMBOL_NAMESPACE
be changed to EXPORT_SYMBOL_NS(sym).
But it doesn't require a default definition of DEFAULT_SYMBOL_NAMESPACE and lets
it be defined in a more obvious part of the source file.

	David


  reply	other threads:[~2024-12-29  8:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-28 18:43 [PATCH] module: Allow DEFAULT_SYMBOL_NAMESPACE be set after export.h included David Laight
2024-12-28 21:38 ` Andy Shevchenko
2024-12-29  8:25   ` David Laight [this message]
2024-12-28 23:29 ` Linus Torvalds
2024-12-29  0:59   ` David Laight
2024-12-30  9:42     ` Uwe Kleine-König
2024-12-30 12:03       ` David Laight
2024-12-30 12:54         ` Uwe Kleine-König
2024-12-30 13:42           ` David Laight
2024-12-30 11:06     ` Masahiro Yamada
2024-12-29  0:45 ` kernel test robot
2024-12-29  3:32 ` kernel test robot
2024-12-30 10:49 ` Masahiro Yamada

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=20241229082524.41494308@dsl-u17-10 \
    --to=david.laight.linux@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=torvalds@linux-foundation.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