From patchwork Tue Jan 16 09:16:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 861353 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zLPnL1Fj3z9sNV for ; Tue, 16 Jan 2018 20:19:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id C0D59C21E0C; Tue, 16 Jan 2018 09:18:15 +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=none 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 371EFC21E14; Tue, 16 Jan 2018 09:17:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AF486C21DFA; Tue, 16 Jan 2018 09:16:56 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 814D1C21C4A for ; Tue, 16 Jan 2018 09:16:55 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 5B54B208B5; Tue, 16 Jan 2018 10:16:54 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 28D5620725; Tue, 16 Jan 2018 10:16:54 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 16 Jan 2018 10:16:38 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH v2 02/15] env: Rename env_driver_lookup_default and env_get_default_location 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The env_driver_lookup_default and env_get_default_location functions are about to get refactored to support loading from multiple environment. The name is therefore not really well suited anymore. Drop the default part to be a bit more relevant. Reviewed-by: Andre Przywara Reviewed-by: Lukasz Majewski Reviewed-by: Simon Glass Signed-off-by: Maxime Ripard --- env/env.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/env/env.c b/env/env.c index 094538ff5b62..97ada5b5a6fd 100644 --- a/env/env.c +++ b/env/env.c @@ -10,7 +10,7 @@ DECLARE_GLOBAL_DATA_PTR; -static struct env_driver *env_driver_lookup(enum env_location loc) +static struct env_driver *_env_driver_lookup(enum env_location loc) { struct env_driver *drv; const int n_ents = ll_entry_count(struct env_driver, env_driver); @@ -26,7 +26,7 @@ static struct env_driver *env_driver_lookup(enum env_location loc) return NULL; } -static enum env_location env_get_default_location(void) +static enum env_location env_get_location(void) { if IS_ENABLED(CONFIG_ENV_IS_IN_EEPROM) return ENVL_EEPROM; @@ -52,12 +52,12 @@ static enum env_location env_get_default_location(void) return ENVL_UNKNOWN; } -static struct env_driver *env_driver_lookup_default(void) +static struct env_driver *env_driver_lookup(void) { - enum env_location loc = env_get_default_location(); + enum env_location loc = env_get_location(); struct env_driver *drv; - drv = env_driver_lookup(loc); + drv = _env_driver_lookup(loc); if (!drv) { debug("%s: No environment driver for location %d\n", __func__, loc); @@ -69,7 +69,7 @@ static struct env_driver *env_driver_lookup_default(void) int env_get_char(int index) { - struct env_driver *drv = env_driver_lookup_default(); + struct env_driver *drv = env_driver_lookup(); int ret; if (gd->env_valid == ENV_INVALID) @@ -89,7 +89,7 @@ int env_get_char(int index) int env_load(void) { - struct env_driver *drv = env_driver_lookup_default(); + struct env_driver *drv = env_driver_lookup(); int ret = 0; if (!drv) @@ -108,7 +108,7 @@ int env_load(void) int env_save(void) { - struct env_driver *drv = env_driver_lookup_default(); + struct env_driver *drv = env_driver_lookup(); int ret; if (!drv) @@ -129,7 +129,7 @@ int env_save(void) int env_init(void) { - struct env_driver *drv = env_driver_lookup_default(); + struct env_driver *drv = env_driver_lookup(); int ret = -ENOENT; if (!drv)