From patchwork Mon Mar 20 04:34:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 740789 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vmjlv1WF3z9s73 for ; Mon, 20 Mar 2017 15:34:50 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="p6jBBQy6"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 4090EC21C32; Mon, 20 Mar 2017 04:34:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BD235C21C32; Mon, 20 Mar 2017 04:34:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3AA65C21C32; Mon, 20 Mar 2017 04:34:35 +0000 (UTC) Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by lists.denx.de (Postfix) with ESMTPS id 893DAC21C2A for ; Mon, 20 Mar 2017 04:34:34 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2K4YVON021225; Sun, 19 Mar 2017 23:34:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489984471; bh=8CkI2r2ri8RclcDLIgs+Juscjp8nqvhFgrgSkdjUYP0=; h=From:To:CC:Subject:Date; b=p6jBBQy6kOs/xDVIqeFL+YlrEEnnjOMCO0VeOdzuETbQx5qAuJJjpln+iZOv3tt4w HSWqz+vgxaSExsKAhERIP3Z5vfvoibQ5nyjG8j23UhhcspptiOYn17IhtxPKkSBTmQ dwYBX+1mLYiGDRCToiUYZb1qeefmqC6p2mQ6Dy8U= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2K4YVAr011457; Sun, 19 Mar 2017 23:34:31 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Sun, 19 Mar 2017 23:34:30 -0500 Received: from a0132425.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2K4YSsN031098; Sun, 19 Mar 2017 23:34:29 -0500 From: Vignesh R To: Tom Rini Date: Mon, 20 Mar 2017 10:04:38 +0530 Message-ID: <20170320043438.19912-1-vigneshr@ti.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2] libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Use CONFIG_IS_ENABLED() macro to check whether OF_TRANSLATE is enabled, so that code block is compiled irrespective of SPL or U-Boot build and fdt address translation is used. Signed-off-by: Vignesh R --- v2: * Depend on OF_TRANSLATE instead of OF_LIBFDT so that boards like chromebook_link64_defconfig compile fine. lib/fdtdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 81f47ef2c7f4..1edfbf2d3921 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -112,7 +112,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node, return FDT_ADDR_T_NONE; } -#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_OF_LIBFDT) +#if CONFIG_IS_ENABLED(OF_TRANSLATE) if (translate) addr = fdt_translate_address(blob, node, prop_addr); else