env: Rename getenv/_f() to env_get()

We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 0e2c4fc..3b92b64 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -749,7 +749,7 @@
 
 int board_cfb_skip(void)
 {
-	return NULL != getenv("novideo");
+	return NULL != env_get("novideo");
 }
 
 static void setup_display(void)
@@ -974,7 +974,7 @@
 	char keypress[ARRAY_SIZE(buttons)+1];
 	numpressed = read_keys(keypress);
 	if (numpressed) {
-		char *kbd_magic_keys = getenv("magic_keys");
+		char *kbd_magic_keys = env_get("magic_keys");
 		char *suffix;
 		/*
 		 * loop over all magic keys
@@ -983,7 +983,7 @@
 			char *keys;
 			char magic[sizeof(kbd_magic_prefix) + 1];
 			sprintf(magic, "%s%c", kbd_magic_prefix, *suffix);
-			keys = getenv(magic);
+			keys = env_get(magic);
 			if (keys) {
 				if (!strcmp(keys, keypress))
 					break;
@@ -993,7 +993,7 @@
 			char cmd_name[sizeof(kbd_command_prefix) + 1];
 			char *cmd;
 			sprintf(cmd_name, "%s%c", kbd_command_prefix, *suffix);
-			cmd = getenv(cmd_name);
+			cmd = env_get(cmd_name);
 			if (cmd) {
 				env_set("preboot", cmd);
 				return;