From: Sam Ravnborg <sam@ravnborg.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Joe Perches <joe@perches.com>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] export.h: remove code for prefixing symbols with underscore
Date: Wed, 9 May 2018 18:07:27 +0200 [thread overview]
Message-ID: <20180509160727.GA7459@ravnborg.org> (raw)
In-Reply-To: <1525850632-10921-6-git-send-email-yamada.masahiro@socionext.com>
Hi Masahiro
On Wed, May 09, 2018 at 04:23:49PM +0900, Masahiro Yamada wrote:
> CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX was selected by BLACKFIN, METAG.
> They were removed by commit 4ba66a976072 ("arch: remove blackfin port"),
> commit bb6fb6dfcc17 ("metag: Remove arch/metag/"), respectively.
>
> No more architecture enables CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
> Clean up the export.h headers. I am keeping VMLINUX_SYMBOL() and
> VMLINUX_SYMBOL_STR() because they are widely used.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> diff --git a/include/linux/export.h b/include/linux/export.h
> index 1a1dfdb..b768d6d 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -10,14 +10,8 @@
> * hackers place grumpy comments in header files.
> */
>
> -/* Some toolchains use a `_' prefix for all user symbols. */
> -#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
> -#define __VMLINUX_SYMBOL(x) _##x
> -#define __VMLINUX_SYMBOL_STR(x) "_" #x
> -#else
> #define __VMLINUX_SYMBOL(x) x
> #define __VMLINUX_SYMBOL_STR(x) #x
> -#endif
>
> /* Indirect, so macros are expanded before pasting. */
> #define VMLINUX_SYMBOL(x) __VMLINUX_SYMBOL(x)
Since we no longer need any expansion, then the indirection
seems unnessesary.
I think we can reduce this to just:
#define VMLINUX_SYMBOL(x) x
Likewise for __VMLINUX_SYMBOL_STR
Sam
next prev parent reply other threads:[~2018-05-09 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 7:23 [PATCH 0/8] kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX and clean-up code Masahiro Yamada
2018-05-09 7:23 ` [PATCH 1/8] modpost: remove symbol prefix support Masahiro Yamada
2018-05-09 7:23 ` [PATCH 2/8] genksyms: " Masahiro Yamada
2018-05-09 7:23 ` [PATCH 3/8] kallsyms: " Masahiro Yamada
2018-05-09 7:23 ` [PATCH 4/8] depmod.sh: " Masahiro Yamada
2018-05-09 7:23 ` [PATCH 5/8] export.h: remove code for prefixing symbols with underscore Masahiro Yamada
2018-05-09 16:07 ` Sam Ravnborg [this message]
2018-05-10 3:39 ` Masahiro Yamada
2018-05-10 5:08 ` Sam Ravnborg
2018-05-09 7:23 ` [PATCH 6/8] kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX Masahiro Yamada
2018-05-09 7:23 ` [PATCH 7/8] vmlinux.lds.h: remove no-op macro VMLINUX_SYMBOL() Masahiro Yamada
2018-05-09 7:23 ` [PATCH 8/8] checkpatch: remove VMLINUX_SYMBOL() check Masahiro Yamada
2018-05-09 16:13 ` [PATCH 0/8] kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX and clean-up code Sam Ravnborg
2018-05-14 0:11 ` 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=20180509160727.GA7459@ravnborg.org \
--to=sam@ravnborg.org \
--cc=arnd@arndb.de \
--cc=joe@perches.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.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;
as well as URLs for NNTP newsgroup(s).