public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 16/16] of: clean up OF_CONTROL ifdef conditionals
Date: Mon, 27 Jul 2015 12:52:23 +0200	[thread overview]
Message-ID: <201507271252.23992.marex@denx.de> (raw)
In-Reply-To: <20150727070503.GA32171@amd>

On Monday, July 27, 2015 at 09:05:03 AM, Pavel Machek wrote:
> On Mon 2015-07-27 10:33:51, Masahiro Yamada wrote:
> > Hi Pavel,
> > 
> > 2015-07-27 3:38 GMT+09:00 Pavel Machek <pavel@denx.de>:
> > > Hi!
> > > 
> > >> We have flipped CONFIG_SPL_DISABLE_OF_CONTROL.  We have cleansing
> > >> devices, $(SPL_) and CONFIG_IS_ENABLED(), so we are ready to clear
> > >> 
> > >> away the ugly logic in include/fdtdec.h:
> > >>  #ifdef CONFIG_OF_CONTROL
> > >>  # if defined(CONFIG_SPL_BUILD) && !defined(SPL_OF_CONTROL)
> > >>  #  define OF_CONTROL 0
> > >>  # else
> > >>  #  define OF_CONTROL 1
> > >>  # endif
> > >>  #else
> > >>  # define OF_CONTROL 0
> > >>  #endif
> > >> 
> > >> Now CONFIG_IS_ENABLED(OF_CONTROL) is the substitute.  It refers to
> > >> CONFIG_OF_CONTROL for U-boot proper and CONFIG_SPL_OF_CONTROL for
> > >> SPL.
> > > 
> > > CONFIG_IS_ENABLED() is a bit too verbose. Could we get something
> > > shorter, like ENABLED()?
> > 
> > The prefix "CONFIG_" is important because this must be
> > searched by scripts/basic/fixdep.c
> > 
> > We are familiar with IS_ENABLED() which originates in Linux,
> > so a new build-context-depending macro, CONFIG_IS_ENABLED() is
> > reasonable naming, I believe.
> > 
> > Besides,
> > 
> > IS_ENABLED(CONFIG_OF_CONTROL)  - before
> > CONFIG_IS_ENABLED(OF_CONTROL)  - after
> 
> What about CONFIG_EN(OF_CONTROL), then? I don't think confusion is
> possible...

I don't like CONFIG_EN(), sorry. It looks like shortening something just
for the sake of shortening it, which is only confusing.

Best regards,
Marek Vasut

  reply	other threads:[~2015-07-27 10:52 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-26  8:26 [U-Boot] [PATCH 00/16] Add macros to ease our life with independent CONFIGs between U-Boot and SPL Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 01/16] ARM: remove vpac270 board support Masahiro Yamada
2015-07-26  8:49   ` Marek Vasut
2015-07-27  2:46     ` Masahiro Yamada
2015-07-27 15:58     ` Masahiro Yamada
2015-07-27 22:31       ` Marek Vasut
2015-07-28 15:53         ` Masahiro Yamada
2015-07-28 15:57           ` Marek Vasut
2015-08-01 16:08             ` Simon Glass
2015-08-01 16:36               ` Marek Vasut
2015-07-26  8:26 ` [U-Boot] [PATCH 02/16] kbuild: fixdep: optimize code slightly Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 03/16] kbuild: add a makefile macro useful with per-image config options Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 04/16] linux/kconfig.h: add CPP macros useful for " Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 05/16] spl: move SPL driver entries to driver/Makefile Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 06/16] dm: unify obj-$(CONFIG_DM) and obj-$(CONFIG_SPL_DM) entries Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 07/16] clk: rename CONFIG_SPL_CLK_SUPPORT to CONFIG_SPL_CLK Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 08/16] clk: unify obj-$(CONFIG_CLK) and obj-$(CONFIG_SPL_CLK) entries Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 09/16] ram: rename CONFIG_SPL_RAM_SUPPORT to CONFIG_SPL_RAM Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 10/16] ram: unify obj-$(CONFIG_RAM) and obj-$(CONFIG_SPL_RAM) entries Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 11/16] led: rename CONFIG_SPL_LED_SUPPORT to CONFIG_SPL_LED Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 12/16] led: unify obj-$(CONFIG_LED) and obj-$(CONFIG_SPL_LED) entries Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 13/16] dm: drop CONFIG_DM_DEVICE_REMOVE from uncmd list Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 14/16] fdtdec: fix OF_CONTROL switch Masahiro Yamada
2015-07-26  8:26 ` [U-Boot] [PATCH 15/16] of: flip CONFIG_SPL_DISABLE_OF_CONTROL into CONFIG_SPL_OF_CONTROL Masahiro Yamada
2015-07-26  8:27 ` [U-Boot] [PATCH 16/16] of: clean up OF_CONTROL ifdef conditionals Masahiro Yamada
2015-07-26 18:38   ` Pavel Machek
2015-07-26 23:30     ` Marek Vasut
2015-07-27  1:33     ` Masahiro Yamada
2015-07-27  7:05       ` Pavel Machek
2015-07-27 10:52         ` Marek Vasut [this message]
2015-07-27 12:30           ` Masahiro Yamada
2015-07-27 16:51 ` [U-Boot] [PATCH 00/16] Add macros to ease our life with independent CONFIGs between U-Boot and SPL Scott Wood

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=201507271252.23992.marex@denx.de \
    --to=marex@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