From patchwork Tue Jan 31 15:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1734941 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TpSQEPnd; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4P5psC25JMz23gV for ; Wed, 1 Feb 2023 02:30:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E0BF585B08; Tue, 31 Jan 2023 16:29:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TpSQEPnd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B5F5985B05; Tue, 31 Jan 2023 16:27:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3EBB185AF4 for ; Tue, 31 Jan 2023 16:27:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x133.google.com with SMTP id i17so6456425ils.11 for ; Tue, 31 Jan 2023 07:27:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5WCNoeuStPBGWICQi/HJBs98B+Nykbu1HWtF8k5vNSA=; b=TpSQEPndth6KmsxDS0ba2ZGjACYNksMI/RFvnV2n1wx5XNC61l1SSjmKdPhsfvNAr0 JwX5yEcVd6nQHGfs3qEWjLjfIqlxW/zmVlALP5uwfe5mspTPYl0cJb3kmZAQ89EkMusd 0Aua0oMauf/ZDRI796IFk2VqDRj8xcG/B0FpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5WCNoeuStPBGWICQi/HJBs98B+Nykbu1HWtF8k5vNSA=; b=kNW0UyGE91wJBSio5y0sROUuoi/IQdTd813NGZfcnj09CcDasD1jqRYXnKnCvpxW/b LSWYgdVf++6ExF6q6pCZ1knqCyAmKWw+EaGRs5huJvptukqgBUrn11bFyn9N90CJf6KZ 5Hem0kVWVCA8l92eUiMVx7GINw0+IM4hSG1IG3D+WDNukLTeaZEyfoFY8D6oYCbGThSE uJ2jHlo8mMRzqHFJAEy8dWvsdcAlJWIKGilmfXgwmaGp2mE17xgtZvlS9qL/xGA/cJ5L zxAlgAOhVboim4L8G9W187qZ56U0yQOViLPXbVxx+QYrrFxhxKhLTKnar7KrkbyL4rBY +lgQ== X-Gm-Message-State: AO0yUKXWq8lu8htQb52RajuV3fYeACmZ2CHCp1YL8f+2dvfdgUge32Cq K/cPjHcgKgb66GHljqPI3/zJdj0+TNv9vGkJ X-Google-Smtp-Source: AK7set9Ep4Ci0E856FHluxPYTNOi4hUM/6AlvTs6yZx8Sj04e7JN50A9igQyoxKDfnDRcn+w2YlJIA== X-Received: by 2002:a05:6e02:144c:b0:311:478:f282 with SMTP id p12-20020a056e02144c00b003110478f282mr4940623ilo.26.1675178865564; Tue, 31 Jan 2023 07:27:45 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id u4-20020a02cb84000000b0039db6cffcbasm5649328jap.71.2023.01.31.07.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:27:45 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger Subject: [PATCH 08/32] env: Avoid checking ENV_IS_IN when env disabled Date: Tue, 31 Jan 2023 08:26:38 -0700 Message-Id: <20230131152702.249197-9-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230131152702.249197-1-sjg@chromium.org> References: <20230131152702.249197-1-sjg@chromium.org> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean This check is not needed when the environment is not enabled, e.g. in SPL. Add a condition to handle this. Signed-off-by: Simon Glass --- cmd/nvedit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index 7cbc3fd573a..277293679df 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -59,11 +59,13 @@ DECLARE_GLOBAL_DATA_PTR; #endif +#if CONFIG_IS_ENABLED(ENV_SUPPORT) #if !defined(ENV_IS_IN_DEVICE) && \ !defined(CONFIG_ENV_IS_NOWHERE) # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\ NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE #endif +#endif /* ENV_SUPPORT */ /* * Maximum expected input data size for import command