public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Arnaud Lacombe <lacombar@gmail.com>
Cc: Rabin Vincent <rabin@rab.in>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: IS_ENABLED() and non-available symbols
Date: Mon, 15 Aug 2011 12:55:00 +0200	[thread overview]
Message-ID: <4E48FB04.9010903@suse.cz> (raw)
In-Reply-To: <1313341346-15605-1-git-send-email-lacombar@gmail.com>

On 14.8.2011 19:02, Arnaud Lacombe wrote:
> Hi,
> 
> On Sun, Aug 14, 2011 at 12:55 PM, Arnaud Lacombe <lacombar@gmail.com> wrote:
>> The solution is trivial, but I am not sure we want to go that way: we
>> need to generated a __enabled_ entry for symbols for _all_ symbols in
>> the configuration, even internal one
>>
> That should do the job...
> 
>  -= NOT FOR MERGE =-
> 
> Not-Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
> 
> ---
>  scripts/kconfig/confdata.c |   42 +++++++++++++++++++++++++++++++-----------
>  1 files changed, 31 insertions(+), 11 deletions(-)
> 
>  	for_all_symbols(i, sym) {
> +		conf_write_symbol(out_h, sym, &header__enabled_printer_cb, NULL);
> +
>  		sym_calc_value(sym);
>  		if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
>  			continue;

I like the approach, it will work even with not visible symbols and
still catch typos (which #ifdef does not protect against). But with the
patch as-is, the generated autoconf.h starts with lots of

#define __enabled_CONFIG_(null) 1
#define __enabled_CONFIG_(null)_MODULE 0
#define __enabled_CONFIG_(null) 1
#define __enabled_CONFIG_(null)_MODULE 0
#define __enabled_CONFIG_(null) 0

Michal

  reply	other threads:[~2011-08-15 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14 10:56 IS_ENABLED() and non-available symbols Rabin Vincent
2011-08-14 16:55 ` Arnaud Lacombe
2011-08-14 17:02   ` Arnaud Lacombe
2011-08-15 10:55     ` Michal Marek [this message]
2011-08-15 14:52       ` Arnaud Lacombe
2011-08-15 19:04         ` Arnaud Lacombe

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=4E48FB04.9010903@suse.cz \
    --to=mmarek@suse.cz \
    --cc=lacombar@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rabin@rab.in \
    /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