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/net/eth_common.c b/net/eth_common.c
index 7b36532..bde3b88 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -26,7 +26,7 @@
 
 int eth_getenv_enetaddr(const char *name, uchar *enetaddr)
 {
-	eth_parse_enetaddr(getenv(name), enetaddr);
+	eth_parse_enetaddr(env_get(name), enetaddr);
 	return is_valid_ethaddr(enetaddr);
 }
 
@@ -76,13 +76,13 @@
 	char *skip_state;
 
 	sprintf(enetvar, index ? "eth%dmacskip" : "ethmacskip", index);
-	skip_state = getenv(enetvar);
+	skip_state = env_get(enetvar);
 	return skip_state != NULL;
 }
 
 void eth_current_changed(void)
 {
-	char *act = getenv("ethact");
+	char *act = env_get("ethact");
 	char *ethrotate;
 
 	/*
@@ -90,7 +90,7 @@
 	 * ethernet device if uc_priv->current == NULL. This is not what
 	 * we want when 'ethrotate' variable is 'no'.
 	 */
-	ethrotate = getenv("ethrotate");
+	ethrotate = env_get("ethrotate");
 	if ((ethrotate != NULL) && (strcmp(ethrotate, "no") == 0))
 		return;
 
@@ -116,7 +116,7 @@
 	 * Do not rotate between network interfaces when
 	 * 'ethrotate' variable is set to 'no'.
 	 */
-	ethrotate = getenv("ethrotate");
+	ethrotate = env_get("ethrotate");
 	if ((ethrotate != NULL) && (strcmp(ethrotate, "no") == 0))
 		return;
 
@@ -142,12 +142,12 @@
 
 	env_id = get_env_id();
 	if ((act == NULL) || (env_changed_id != env_id)) {
-		act = getenv("ethact");
+		act = env_get("ethact");
 		env_changed_id = env_id;
 	}
 
 	if (act == NULL) {
-		char *ethprime = getenv("ethprime");
+		char *ethprime = env_get("ethprime");
 		void *dev = NULL;
 
 		if (ethprime)