From patchwork Sun Feb 12 23:15:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1741261 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=FNxcrnUm; 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 4PFPDh4GhQz23qt for ; Mon, 13 Feb 2023 10:43:32 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BEBFA8573F; Mon, 13 Feb 2023 00:42:49 +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="FNxcrnUm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 959AF85772; Mon, 13 Feb 2023 00:18:06 +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-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 32D2985798 for ; Mon, 13 Feb 2023 00:17:49 +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-io1-xd31.google.com with SMTP id d16so3934455ioz.12 for ; Sun, 12 Feb 2023 15:17:49 -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=QouZX6DJOaRUMfE2ZU9MxD+mbIrLYtdagi8qj0t3Wmw=; b=FNxcrnUm73x1lVH/64UbUqOPAk19Vo5nXmjBDgeKTOV9Q1WKCo3pjzf9QRCWQ+YaOU dpQz2+4h7q/qb0U3+/CxWykTrnJdJfDyimoJ8oGVL7t1jnT0lks7naES68pnvfunaMJt ArsvS379aV7A+k8p9okXNsuEyFwLMu3crtQUQ= 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=QouZX6DJOaRUMfE2ZU9MxD+mbIrLYtdagi8qj0t3Wmw=; b=vGIwXLwhtRqAxk4MLOv0nsWLTJEuqa20/cJJ8k2Os4qEwWkKzXC6UYyw5AcWmkxTo0 vlCAFAMyIPU43fxbmm+JkDBVPuyc4t3YdQSmlI8f81oWlcUmAC0NeMyDaXBPc72xpDKg czuT8QzbvQOuGXcl+xc0YnTbq2odOgHbJhtweiOVGCln5IYTCTYQ5XN3dTV1BAFDauzg j15sxYH6CHu7RTAZZ0M0CMyeJcuTJKWMeQ90uMBeaiPniV61YZ0+jCEx6rjQp1VMHanU uSX7Cn5LHd2Mir5H+V67Z0Luk/4xLrfLYnrBTScuoXi6DY2Mcwwm8j3uARFXd3scEbeA j9/w== X-Gm-Message-State: AO0yUKXA9lFXk6MXFeGQoDkt4RMcfyXGy5ZF1POAq78J6n/DX61pF6jZ AueL2HXeIxF5BWpuxXujhwr+wVX0vqIt/XwX X-Google-Smtp-Source: AK7set9m9UAYDJ6eaO4ukbWKm7pGr7cM3vGb6fOJCePmWO0/gaiRubq6JNOsY5bh3ch/+diNYr4g/Q== X-Received: by 2002:a6b:d00f:0:b0:73a:4d19:cef0 with SMTP id x15-20020a6bd00f000000b0073a4d19cef0mr12768638ioa.16.1676243868710; Sun, 12 Feb 2023 15:17:48 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id n16-20020a6b8b10000000b006dfbd35e995sm3627849iod.21.2023.02.12.15.17.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 15:17:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger Subject: [PATCH v3 44/95] env: Avoid checking ENV_IS_IN when env disabled Date: Sun, 12 Feb 2023 16:15:47 -0700 Message-Id: <20230212231638.1134219-45-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.581.gbfd45094c4-goog In-Reply-To: <20230212231638.1134219-1-sjg@chromium.org> References: <20230212231638.1134219-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 --- (no changes since v1) 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