From patchwork Sun Jul 28 14:03:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1138009 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LdAmPOkb"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45xQ7P4kp3z9s4Y for ; Mon, 29 Jul 2019 00:24:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 507D6C21DD3; Sun, 28 Jul 2019 14:16:42 +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=RCVD_IN_MSPIKE_H2, 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 56F42C21E56; Sun, 28 Jul 2019 14:10:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 086C1C21E7E; Sun, 28 Jul 2019 14:06:54 +0000 (UTC) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by lists.denx.de (Postfix) with ESMTPS id 950A5C21D8E for ; Sun, 28 Jul 2019 14:06:51 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id k8so114555388iot.1 for ; Sun, 28 Jul 2019 07:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oJF3yzQLK7jEZeV/5VPnkvNIo/gioNfiBkzZuNM6atI=; b=LdAmPOkbbbUw/lMOaHARdObjIBcPxOFeX6ujsixJREMGa/YFLJpFDRpmpJr65VfrxE LbYt7wly6ZWuceZh1yjE7Ch/EMmPrelsKqFNJcaaWpE2GSD9V2/xEMJ0CRNs2cgRP6nW pnUR33/gLZfOqFkyIa4AnzzcgJyH0W4yWM3P8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oJF3yzQLK7jEZeV/5VPnkvNIo/gioNfiBkzZuNM6atI=; b=jzBRRNuH2WK98SP+sME8jxsWYADcsI/nqKuDaazvxL6ClAQ6NHN0x8+dWvs53fx3Pf DDQ5eIixb5PWEg+T4TucxrJLbKBK5n/I56glp19+anzyYt9uce3Bhflns5sahtJy27y9 crIvHlGlKLEMbg1UZXcE1obqEWNvdkKRuIdhd7+eWjhjlnUhh4Bj9o4QxDFSStSSNJdi jJQQozD8zGIkjuS2MfbS1o9Z2Q2XgT0ISuupcCK1YPK6e3Y/fGaV4E3lfRNwXVlr+mfZ EnWBR8zq+1ub2Xz5gaOggQ59YNvrn30PsdisDvb2UwSC9GpcLwH854vg4+WR9lfQ1Vw/ YWiw== X-Gm-Message-State: APjAAAWAPVZBg3adz/m88opLi+kOGNWgyHXzTS5f+/TBKNjN1q8PvmtH X353hZVIJfk/C1Gly48KoJ1Y6n0PSKU= X-Google-Smtp-Source: APXvYqwpzKaGxaGJJQV7EO4LHTgf8RwG/HbLMyerKWHt3XhxRfwjbhFXPaOSvygoKaFFXAvlKfygIg== X-Received: by 2002:a5e:d615:: with SMTP id w21mr28604974iom.0.1564322810184; Sun, 28 Jul 2019 07:06:50 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t5sm46782450iol.55.2019.07.28.07.06.49 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 28 Jul 2019 07:06:49 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sun, 28 Jul 2019 08:03:45 -0600 Message-Id: <20190728140357.137295-29-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog In-Reply-To: <20190728140357.137295-1-sjg@chromium.org> References: <20190728140357.137295-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Joe Hershberger , Tom Rini Subject: [U-Boot] [PATCH 28/39] env: Move env_valid to env.h 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" This enum is somewhat widely used to determine if the environment is valid or not. Move it to the common environment header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- env/flash.c | 1 + env/nowhere.c | 1 + include/env.h | 9 ++++++++- include/environment.h | 7 ------- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/env/flash.c b/env/flash.c index a26d94309d..7a73466cf2 100644 --- a/env/flash.c +++ b/env/flash.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/env/nowhere.c b/env/nowhere.c index ea6c32eb3b..7db4eec845 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/include/env.h b/include/env.h index 82214d973e..93a4c3ed6b 100644 --- a/include/env.h +++ b/include/env.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Common environment functions + * Common environment functions and definitions * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -14,6 +14,13 @@ struct environment_s; +/* Value for environment validity */ +enum env_valid { + ENV_INVALID, /* No valid environment */ + ENV_VALID, /* First or only environment is valid */ + ENV_REDUND, /* Redundant environment is valid */ +}; + /** * env_get_id() - Gets a sequence number for the environment * diff --git a/include/environment.h b/include/environment.h index 44a527e1fa..c3e8d7840a 100644 --- a/include/environment.h +++ b/include/environment.h @@ -165,13 +165,6 @@ extern const unsigned char default_environment[]; #include #include -/* Value for environment validity */ -enum env_valid { - ENV_INVALID, /* No valid environment */ - ENV_VALID, /* First or only environment is valid */ - ENV_REDUND, /* Redundant environment is valid */ -}; - enum env_location { ENVL_UNKNOWN, ENVL_EEPROM,