public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 0/8] Provide a mechanism to avoid using #ifdef everywhere
Date: Wed, 06 Nov 2013 09:30:53 +0100	[thread overview]
Message-ID: <5279FE3D.6040909@denx.de> (raw)
In-Reply-To: <20131106072444.055753811E0@gemini.denx.de>

Hi Wolfgang,

On 06.11.2013 08:24, Wolfgang Denk wrote:

<snip>

> 	if (autoconf_version_variable())
> 		setenv("ver", version_string);  /* set version variable */
> 
> By chance I ran about "include/linux/kconfig.h" in the Linux kernel
> tree, which provides (among other things) the IS_ENABLED() macro that
> implements essentially the very same feature.  Using this, the same
> code would be written as:
> 
> 	if (IS_ENABLED(CONFIG_VERSION_VARIABLE))
> 		setenv("ver", version_string);  /* set version variable */
> 
> I agree that this does not solve some of the isses that have been
> raised about this change (indentation level increses - which may in
> turn require reformatting of bigger parts of the code; code becomes
> less readable), but on the other hand it avoids the need for a new
> autoconf header file, and it should be possible to introduce this
> easily step by step.
> 
> And I really like the idea of re-using existing code that is already
> known to Linux hackers, especially as we we are currently having our
> eyes on the Kconfig stuff anyway.

I just recently also noticed this IS_ENABLED() feature (in barebox btw)
and thought directly about Simon's patchset regarding this matter. And I
personally would favor IS_ENABLED() to the newly created autoconf_xxx names.

Thanks,
Stefan

  reply	other threads:[~2013-11-06  8:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-26 15:14 [U-Boot] [PATCH v4 0/8] Provide a mechanism to avoid using #ifdef everywhere Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 1/8] Implement autoconf header file Simon Glass
2013-11-10 19:47   ` Marek Vasut
2013-10-26 15:14 ` [U-Boot] [PATCH v4 2/8] main: Use autoconf for boot retry feature Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 3/8] main: Remove CONFIG #ifdefs from the abortboot() code Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 4/8] main: Use autoconf to remove #ifdefs around process_boot_delay() Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 5/8] main: Use autoconf for boot_delay code Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 6/8] main: Use autoconf for parser selection Simon Glass
2013-10-28 14:21   ` Michal Simek
2013-10-26 15:14 ` [U-Boot] [PATCH v4 7/8] main: Use autoconf in command line reading Simon Glass
2013-10-26 15:14 ` [U-Boot] [PATCH v4 8/8] main: Use autoconf in main_loop() Simon Glass
2013-10-28 14:44 ` [U-Boot] [PATCH v4 0/8] Provide a mechanism to avoid using #ifdef everywhere Wolfgang Denk
2013-10-28 15:32   ` Tom Rini
2013-10-28 20:31     ` Simon Glass
2013-11-06  7:24 ` Wolfgang Denk
2013-11-06  8:30   ` Stefan Roese [this message]
2013-11-07  9:20   ` Albert ARIBAUD
2013-11-10  4:24   ` Simon Glass
2013-11-10 12:58     ` Wolfgang Denk
2014-01-14 10:11     ` Detlev Zundel
2014-01-15 18:11       ` Simon Glass
2014-01-17 15:13         ` Detlev Zundel
2014-01-26 20:58           ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2013-06-17 14:44 Simon Glass
2013-06-23  7:29 ` Albert ARIBAUD
2013-06-25  0:52   ` Simon Glass
2013-06-27  7:04     ` Albert ARIBAUD
2013-06-27  7:15       ` Simon Glass

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=5279FE3D.6040909@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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