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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3E485C433F5 for ; Sat, 2 Apr 2022 22:25:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7B5D83A79; Sun, 3 Apr 2022 00:25:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WrmsdUTv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B2D1E839C2; Sun, 3 Apr 2022 00:24:55 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 E49AC839AA for ; Sun, 3 Apr 2022 00:24:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 90F0EB80A06; Sat, 2 Apr 2022 22:24:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C07BC340F0; Sat, 2 Apr 2022 22:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648938286; bh=Zv+HBigt3Ppr29vO/fMpbOyUU1eQGFuzMkTryx+td5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WrmsdUTvjn9OSdI7jr0Sw05UxTOYrtJ9Ar5K6wIk8c4xxEzc9L9ip9Nm7KNIOoN56 p7Q9zxst58UuILSFSNMSbRbh1Q9gCx0jbxQMi5t2UkHGMo4x4w29jNA2Aueqi9r9B5 HT4R9sLWolEr+/cEbkuFUHbgq9YUQNVo1Fxf/cARMoyhYS3Tqa2Yo4091WUC08ARU9 Rpei0aedNZL8dSUQoWCGLCN17k/cFm3Cr4LXWwHrLoWalIz7K2hTeU7FI0a5BEniSr 5wPQISL5J32g4Aq5gdWPclvC06U6AVQBfbcuMtGhM7h7TJg+2fn9qfEBmXHatySVWz L9TdSS72Ub8Tw== Received: by pali.im (Postfix) id 8BABCFE8; Sun, 3 Apr 2022 00:24:43 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Priyanka Jain , Wolfgang Denk Cc: u-boot@lists.denx.de Subject: [PATCH 1/3] hwconfig: Allow to compile it without env support Date: Sun, 3 Apr 2022 00:24:25 +0200 Message-Id: <20220402222427.19212-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220402222427.19212-1-pali@kernel.org> References: <20220402222427.19212-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean When env support is disabled then usage of env_get() generates linker errors. So do not compile env_get() when env support is disabled (for example when disabled only in SPL). Signed-off-by: Pali Rohár --- common/hwconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/hwconfig.c b/common/hwconfig.c index 63b3ccaf84e2..43566b81bd48 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -83,7 +83,9 @@ static const char *__hwconfig(const char *opt, size_t *arglen, "and before environment is ready\n"); return NULL; } +#if CONFIG_IS_ENABLED(ENV_SUPPORT) env_hwconfig = env_get("hwconfig"); +#endif } if (env_hwconfig) { -- 2.20.1