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/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index 29799dc..353109c 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -526,9 +526,9 @@
 	int snlen;
 
 	/* Ger seiral number */
-	if (!(sn = getenv("serial#"))) {
+	sn = env_get("serial#");
+	if (!sn)
 		sn = "000000000000";
-	}
 	snlen = strlen(sn);
 	if (snlen > sizeof(serial_number) - 1) {
 		printf ("Warning: serial number %s is too long (%d > %lu)\n",
@@ -540,10 +540,9 @@
 
 	/* Decide on which type of UDC device to be.
 	 */
-
-	if(!(tt = getenv("usbtty"))) {
+	tt = env_get("usbtty");
+	if (!tt)
 		tt = "generic";
-	}
 	usbtty_init_terminal_type(strcmp(tt,"cdc_acm"));
 
 	/* prepare buffers... */