From patchwork Tue Jan 23 20:16:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125574 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1982913ljf; Tue, 23 Jan 2018 12:20:53 -0800 (PST) X-Google-Smtp-Source: AH8x227/MPKwjDFvNJj9mz4BSBJ5jVtKsacTuiZNmyLwNc8ew+ADO8Y0eF6J4vmgomf21pvhH5hi X-Received: by 10.80.153.143 with SMTP id m15mr20931191edb.145.1516738853907; Tue, 23 Jan 2018 12:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516738853; cv=none; d=google.com; s=arc-20160816; b=HLsSaSJOY14Rnv5/vhf/4QLxWoLOdqZKaKJfBoRJzHEwjqzwNvNHGaNQKCqiW13q7K do0a/qbzaNgtv/g0Prd12fodIzv8vQ99qK9xaLfRxZPPpgO0YYsfwlboHHG2DMB71IWd cGzgoNJNP626/br9iT7DXzEo3WTh2ZJN0XaDDATBMOJ2LmY0X/l23K2VO9aDkNtDRZHy GMSdGAHaL7ahqKEfIyBF1o2d/0cWHNlruRI+ChsTnIlsriVwoO5BT5jSyLOQ0gC6+elN RICjzo8v3R1LC9380VRpP3jaKvGF+GBsPyt6nXg7O5QKi3FkgaDcGHBWrguS/lEXCJ6l UP1Q== 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=M6bRm28HZSfb7+OMzgHhg4LURV1P5br6jeSHEkZ4TnqTG3O4MM6OaKmlmkdTWLkfWN qT2jebjaxpFkD6EVYncNNOejDH5cosRmE1BU1bFMH46TTYVFaF5f1SG5jQJwiclUNQFL Kxts4g20zpruZlMYdkvpFY2gwrI1kvbvU/lQyuoBSMIJ+9o46JtsgQkzvqDmm+ylFSd4 64y6mEe0MJwLkm3i8VCEc9Fd3zw0sRtYSbe7xww6dIntMjywMN/skp66Odr+iGhUG55o UEJlazoXeB/7dQPodUCVX1ioBT1DGNQ5XoH6zL+UD/VIp7PfD5gCBbq0lsDoIHAa5GG+ Bxzg== 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 i2si480510edf.508.2018.01.23.12.20.53; Tue, 23 Jan 2018 12:20:53 -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 790F0C21EF2; Tue, 23 Jan 2018 20:17:53 +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 0A3AAC21F0C; Tue, 23 Jan 2018 20:17:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A908BC21C3F; Tue, 23 Jan 2018 20:17:08 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 56EB7C21C51 for ; Tue, 23 Jan 2018 20:17:08 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 319CF20C1B; Tue, 23 Jan 2018 21:17:08 +0100 (CET) Received: from localhost (LFbn-1-2035-97.w90-76.abo.wanadoo.fr [90.76.104.97]) by mail.free-electrons.com (Postfix) with ESMTPSA id F02BD207A8; Tue, 23 Jan 2018 21:17:07 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 23 Jan 2018 21:16:51 +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 v3 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)