linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	James Hogan <james.hogan@imgtec.com>,
	Al Viro <viro@zeniv.linux.org.uk>, Michal Marek <mmarek@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Jean Delvare <khali@linux-fr.org>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mike Frysinger <vapier@gentoo.org>,
	uclinux-dist-devel@blackfin.uclinux.org,
	linux-next@vger.kernel.org
Subject: Re: [RFC -next] linux/linkage.h: fix symbol prefix handling
Date: Wed, 13 Mar 2013 07:31:57 +0100	[thread overview]
Message-ID: <20130313063157.GB19681@merkur.ravnborg.org> (raw)
In-Reply-To: <87ehfkuq27.fsf@rustcorp.com.au>

> actually, y'know, proof-read it.
Hmm..


> +                   $(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_SYMBOL_PREFIX_UNDERSCORE))"
>  
> +config HAVE_UNDERSCORE_SYMBOL_PREFIX

HAVE_UNDERSCORE_... or HAVE_SYMBOL_... confusion.
I prefer the HAVE_SYMBOL_... variant but no strong feelings..

> + *
> + * If you think the above arrogance just encourages more people to add
> + * random crap to this file, you're not alone.
Kill this.

>  /* Some toolchains use a `_' prefix for all user symbols. */
> -#ifdef CONFIG_SYMBOL_PREFIX
> -#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
> +#ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
> +#define __VMLINUX_SYMBOL(x) _##x
> +#define __VMLINUX_SYMBOL_STR(x) "_" #x
> +#define VMLINUX_SYMBOL_PREFIX_STR "_"
>  #else
> -#define MODULE_SYMBOL_PREFIX ""
> +#define __VMLINUX_SYMBOL(x) x
> +#define __VMLINUX_SYMBOL_STR(x) #x
> +#define VMLINUX_SYMBOL_PREFIX_STR ""
>  #endif

We know the prefix is an underscore. No benefits from defining
VMLINUX_SYMBOL_PREFIX_STR. The config name even syas so.
Skipping the above give us only one way to check
for the prefix - today we mix the two.

	Sam


  reply	other threads:[~2013-03-13  6:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 11:44 [RFC -next] linux/linkage.h: fix symbol prefix handling James Hogan
2013-03-08  0:03 ` Rusty Russell
2013-03-08  9:15   ` James Hogan
2013-03-11  6:35     ` Rusty Russell
2013-03-11 12:07       ` Stephen Rothwell
2013-03-12  4:48         ` Rusty Russell
2013-03-12 12:33           ` Stephen Rothwell
2013-03-13  0:00             ` Rusty Russell
2013-03-13  6:31               ` Sam Ravnborg [this message]
2013-03-13  9:21                 ` James Hogan
2013-03-13 18:15                   ` Sam Ravnborg
2013-03-14  4:00                 ` Rusty Russell
2013-03-14 10:49                   ` James Hogan
2013-03-15  4:37                     ` Rusty Russell
2013-03-12 12:36           ` James Hogan

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=20130313063157.GB19681@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=james.hogan@imgtec.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mmarek@suse.cz \
    --cc=rusty@rustcorp.com.au \
    --cc=sfr@canb.auug.org.au \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).