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 EBD01C636D6 for ; Wed, 22 Feb 2023 16:49:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 536F785BE9; Wed, 22 Feb 2023 17:45:15 +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="aaRcIPlF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B3A185B25; Wed, 22 Feb 2023 17:36:03 +0100 (CET) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 C525785B15 for ; Wed, 22 Feb 2023 17:34:58 +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-xd2b.google.com with SMTP id d73so3700921iof.4 for ; Wed, 22 Feb 2023 08:34:58 -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=u2gagAj84o/PpmePgSaWDRgAvHJI8p9hoQj93J3TbiI=; b=aaRcIPlFSzwSzAGH36vz94FBwMcRm2Kl3UnYpJx1crUZ01CSm1QAE1ROnyUZq6wtz1 9BUSmNNNnfinb92PBWzzm7yVHB9Ut+WwA2ufEKaGBMDoBkFPZ09XBY6Fn2lvpsW3NxR/ MSiQVjOJ3hcNNN0mIQrDxuXjB9t4iNWZnFSbo= 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=u2gagAj84o/PpmePgSaWDRgAvHJI8p9hoQj93J3TbiI=; b=oCfrKm5a/VamC/J32RKb/6KlX3yxHTveN+L5L1tVPxbqZgOp7IhHMRYoVfUrbPDbzF 4cM0XrUKfYIk9QryGxpeazlR0/RStl6HXKX3nmWkB5iSpw2OuRQl4YWQd2Vr2L4yEfXJ rGRy2USwDhagc+1ng3cH95Us3OI0KrlI2NWg1REcp9pRsg/JT7AQjBQLBxS1cuSoM6ac h2+JhaQA/AwUplxkqHr8o9F7/ezrN5LJZ9vABlnFMy0qKEPhSQVQbqkPG6zskiajuqBu aIpDypo2STmGIPIHtiaqGrLDnh/qmAcSZWGJC532mB9yxJqJFEE/dBA5gp5Mg+iitcy/ ssEg== X-Gm-Message-State: AO0yUKV2JxliXCBdhRgP9XyW9P4sgdIyKNc6hl8DVwoSGlIzeN2shIPY SxAXxZJP7ln6m7KLMUKPucffXtcXKqiHvz0G X-Google-Smtp-Source: AK7set+WcqbAKg0MuMXAnDxOVxFuHFBoQCX1LYeaZniKwV2UX885kPA4Det+m5nLePs8NBCFxBmj8A== X-Received: by 2002:a5d:9f17:0:b0:74c:7ea1:4f05 with SMTP id q23-20020a5d9f17000000b0074c7ea14f05mr4958020iot.2.1677083696953; Wed, 22 Feb 2023 08:34:56 -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 z26-20020a056602005a00b00716eb44b97esm2164541ioz.27.2023.02.22.08.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 08:34:56 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger , Samuel Dionne-Riel Subject: [PATCH v5 18/44] env: Avoid checking ENV_IS_IN when env disabled Date: Wed, 22 Feb 2023 09:33:59 -0700 Message-Id: <20230222163425.2043934-19-sjg@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230222163425.2043934-1-sjg@chromium.org> References: <20230222163425.2043934-1-sjg@chromium.org> MIME-Version: 1.0 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.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 -- 2.39.2.637.g21b0678d19-goog