From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83113C433EF for ; Mon, 1 Nov 2021 07:49:52 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D99360F46 for ; Mon, 1 Nov 2021 07:49:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D99360F46 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E5F9F82EA5; Mon, 1 Nov 2021 08:49:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id CE33D82051; Mon, 1 Nov 2021 08:49:47 +0100 (CET) Received: from ATCSQR.andestech.com (atcsqr.andestech.com [60.248.187.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B36E582051 for ; Mon, 1 Nov 2021 08:49:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=andestech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ycliang@andestech.com Received: from mail.andestech.com (ATCPCS16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id 1A17nCwr022452; Mon, 1 Nov 2021 15:49:12 +0800 (GMT-8) (envelope-from ycliang@andestech.com) Received: from ubuntu02 (10.0.12.212) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.498.0; Mon, 1 Nov 2021 15:49:13 +0800 Date: Mon, 1 Nov 2021 15:49:07 +0800 From: Leo Liang To: Bin Meng CC: Rick Chen , U-Boot Mailing List Subject: Re: [PATCH] riscv: ae350: Use #if defined instead of CONFIG_IS_ENABLED Message-ID: References: <20211027085908.2051-1-ycliang@andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) X-Originating-IP: [10.0.12.212] X-DNSRBL: X-MAIL: ATCSQR.andestech.com 1A17nCwr022452 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Bin, On Mon, Nov 01, 2021 at 02:04:48PM +0800, Bin Meng wrote: > Hi Leo, > > On Wed, Oct 27, 2021 at 4:59 PM Leo Yu-Chi Liang wrote: > > > > According to ./include/linux/kconfig.h, > > CONFIG_IS_ENABLED(OF_BOARD) expands to 0 > > when CONFIG_SPL_BUILD is defined because > > there is no CONFIG_SPL_OF_BOARD. > > Why is the change? > The original code was void *board_fdt_blob_setup(void) { #if CONFIG_IS_ENABLED(OF_BOARD) return (void *)(ulong)gd->arch.firmware_fdt_addr; #elif CONFIG_IS_ENABLED(OF_SEPARATE) return (void *)CONFIG_SYS_FDT_BASE; #else return NULL; } But the "return (void *)(ulong)gd->arch.firmware_fdt_addr;" does not get compiled even if OF_BOARD is selected when building ae350_*_spl_*_defconfig, thus this patch. The reason is because ./include/linux/kconfig.h states "CONFIG_IS_ENABLED(FOO) expands to 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y'". However, we don't have CONFIG_SPL_OF_BOARD, so CONFIG_IS_ENABLED(OF_BOARD) only expands to 0. Best regards, Leo > > > > Use #if defined instead. > > > > Signed-off-by: Leo Yu-Chi Liang > > --- > > board/AndesTech/ax25-ae350/ax25-ae350.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > Regards, > Bin