From patchwork Tue Nov 28 10:24:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 119825 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2911974edl; Tue, 28 Nov 2017 02:30:49 -0800 (PST) X-Google-Smtp-Source: AGs4zMblRKXFinMHXHaIIsVX1AqlsFlHJ6ZwQ0PA3wrsELWAPHI6f8w+WMy00Q4cGtbamTbzOlUm X-Received: by 10.80.245.102 with SMTP id w35mr1938366edm.179.1511865049140; Tue, 28 Nov 2017 02:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511865049; cv=none; d=google.com; s=arc-20160816; b=HbCn3sy7GVsTBqaT9z8gyOt484iQRvyYpO7tiLtMtiAipzkGLGU+iy3D3KZDZ87WOm JdTmcnDu6l8EdIbuCSdZFUEGDqR2+/c+bInzogXiG0JgxqL5Z4r+9Nx5pqEsos/KRKti KZdamg2wyzub280ZXS3C+8oZ7DSZycOzhsSj8iGPZCeRGgNAFqYDxuhByyhArQ+Cl99v fWbR8FCugxAJfJ545/JMgaKfo075VivdyMlw5ClwxvPaP2NU2QkwtcIqGSf+vGTO0daA vgxST5968NEtSIWDBvFebEXRfUjax8UQM7kDsmS2HTxkp/V2zwhB67iIV6ru/+sF1UEj luZw== 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=UZ0D9OBYBFzyqHEWI+vCsFwrP2HNVjqwhmsDeZhL9qc=; b=LUCIRn9ufr0Yg8e8ynga4/sjke/qTETe4wjc65wDCP5WZAODsCRJfUm4U8cXd+OG7m XFNYOV+R6770Sk7rML5MiOQjeI0A4pZKxBqBBuuekow6o60rLLxLQTSIgXzLIkFquCRo W2/FleKhTnJpkQnli8POU32tUKxs4NbNMo8I1OWlpMCUKYAdxuXdijUSDXVHpnf2Rfaj PF9bpfW1GNNaJjn7hBb1/qk+Ru8Nj2Lap9XxtTl6cQSgLmW6zJj7pMsxvjWL4cB/E/ct qaZVpF8ApaeorfAhR+qnuXzKIXhsX7r3wruhVTJk90JgNw/v3Uf4IhYLW6if5dCajjWg wGrA== 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 s7si3108016edh.291.2017.11.28.02.30.48; Tue, 28 Nov 2017 02:30:49 -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 BEF37C21E0C; Tue, 28 Nov 2017 10:26:14 +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 E3041C21DF3; Tue, 28 Nov 2017 10:24:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0D50AC21D6A; Tue, 28 Nov 2017 10:24:53 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id AB27EC21D79 for ; Tue, 28 Nov 2017 10:24:53 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 0B4B72074B; Tue, 28 Nov 2017 11:24:53 +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 D42A620380; Tue, 28 Nov 2017 11:24:52 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 28 Nov 2017 11:24:37 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Thomas Petazzoni , u-boot@lists.denx.de, Andre Przywara , agraf@suse.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH 02/14] 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: Lukasz Majewski Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara Reviewed-by: Simon Glass --- 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)