From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 27 Jul 2015 01:30:19 +0200 Subject: [U-Boot] [PATCH 16/16] of: clean up OF_CONTROL ifdef conditionals In-Reply-To: <20150726183846.GA9041@amd> References: <1437899226-14925-1-git-send-email-yamada.masahiro@socionext.com> <1437899226-14925-17-git-send-email-yamada.masahiro@socionext.com> <20150726183846.GA9041@amd> Message-ID: <201507270130.19149.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday, July 26, 2015 at 08:38:46 PM, Pavel Machek wrote: > 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()? > Pavel Linux has an IS_ENABLED() macro to my knowledge. Best regards, Marek Vasut