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: 124637 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp947832lje; Tue, 16 Jan 2018 01:21:26 -0800 (PST) X-Google-Smtp-Source: ACJfBovL1zWcoWofWmpFYc6pgVEOug5VAYWAKxJki1gMMKtXVC25gxh2PVHxPaCTQuzj4kM2TUfJ X-Received: by 10.80.204.4 with SMTP id m4mr6538128edi.146.1516094486666; Tue, 16 Jan 2018 01:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516094486; cv=none; d=google.com; s=arc-20160816; b=R01pgXRSLMirDKpkk9R2hnlhR6f0GLEG1P76FVplPyWoS1op+TFLB+w6w59UTSE+TR X9NuRf9QxlYdpUXfyWiigVB7ly3wCaRnvH2fx6GgS+aHOLqLtx+i3mFH+N3zZSmUAuVG SmgLy3NXgNkwNCKwwrlVK8SWKB03kNxa1igd/wCa9sgyImC5d3wXjpFA4k95HF0NSfYk AS7ZHpfRZT77I998efXhGodT9rCO+RL/irMLo+Yb6VPjQF1Elc6dLI0+Uel6meJgiOUc +t6MB5qUvjEiOq8GvdGPKSCipigoEEDv1yxmJk2pJRNQNBq++GfIskGF+axSB8sbWpeH d8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:arc-authentication-results; bh=vlMiHPcoPAC+98M2hyduRHT+hzVYtAfDocwS/Q1vIWI=; b=nn2c7IhBIzILYSdVs+WawS3e5ZJgYDGYQSkHO+ak4xuHLlqKM76semVFtmqTPIgKp3 h2emW2TVW6/w9Zf0VEXGWVAAaWy3OvRat+QRjtApGjK3I77GdyQ+YrSZH9MjVehmT43b 8atixFerSULMq7KWjB1c+eOnv3+fQcZ8Te1/fTEm4NgHKPOMIocGymWd+XX5P9RhkiZ0 QmyuplzKbCJZiDXxlupGqiBQ3M5GSDpO5Hwgs6hn3m2/IJ3+TEKMRhoRBGZ+0qB8c5+o 7hGO1WKFfeEGeR02YheLNwU4ltNj5M3mTdZE3CwvUzWTJMT2dSriK435dYU9oLcbpFem hxIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id y4si534594edi.180.2018.01.16.01.21.26; Tue, 16 Jan 2018 01:21:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 2777FC21DD9; 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)