All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yaniv Levinsky <yaniv.levinsky@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] cmd: nvedit: rename flags in do_env_default
Date: Sun, 24 Jun 2018 19:16:54 +0300	[thread overview]
Message-ID: <20180624161657.32632-2-yaniv.levinsky@compulab.co.il> (raw)
In-Reply-To: <20180624161657.32632-1-yaniv.levinsky@compulab.co.il>

The naming convention for flags in nvedit.c is:
* The hashtable flag (defined in search.h) is named "env_flag"
* The command flag argument (defined in command.h) is named "flag"

This convention is kept in functions like do_env_print(), do_env_set()
and do_env_delete(), but not in do_env_default().

Rename the hashtable flag in do_env_default() from "flag" to "env_flag".
Rename the command flag in do_env_default() from "__flag" to "flag".

No functional change.

Signed-off-by: Yaniv Levinsky <yaniv.levinsky@compulab.co.il>
Reviewed-by: Igor Grinberg <grinberg@compulab.co.il>
---
 cmd/nvedit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index ddc888a4fd..d456d2fc9b 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -777,10 +777,10 @@ int envmatch(uchar *s1, int i2)
 }
 
 #ifndef CONFIG_SPL_BUILD
-static int do_env_default(cmd_tbl_t *cmdtp, int __flag,
+static int do_env_default(cmd_tbl_t *cmdtp, int flag,
 			  int argc, char * const argv[])
 {
-	int all = 0, flag = 0;
+	int all = 0, env_flag = 0;
 
 	debug("Initial value for argc=%d\n", argc);
 	while (--argc > 0 && **++argv == '-') {
@@ -792,7 +792,7 @@ static int do_env_default(cmd_tbl_t *cmdtp, int __flag,
 				all = 1;
 				break;
 			case 'f':		/* force */
-				flag |= H_FORCE;
+				env_flag |= H_FORCE;
 				break;
 			default:
 				return cmd_usage(cmdtp);
-- 
2.17.1

  reply	other threads:[~2018-06-24 16:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-24 16:16 [U-Boot] [PATCH 0/4] fix propagation of flags from do_env_default() Yaniv Levinsky
2018-06-24 16:16 ` Yaniv Levinsky [this message]
2018-07-20 12:35   ` [U-Boot] [U-Boot, 1/4] cmd: nvedit: rename flags in do_env_default Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 2/4] cmd: nvedit: propagate envflag to set_default_vars Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 3/4] cmd: nvedit: set H_INTERACTIVE in do_env_default Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-06-24 16:16 ` [U-Boot] [PATCH 4/4] env: common: accept flags on reset to default env Yaniv Levinsky
2018-07-20 12:35   ` [U-Boot] [U-Boot, " Tom Rini
2018-07-11 15:21 ` [U-Boot] [PATCH 0/4] fix propagation of flags from do_env_default() Yaniv Levinsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180624161657.32632-2-yaniv.levinsky@compulab.co.il \
    --to=yaniv.levinsky@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.