diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:12 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:30:24 -0400 |
commit | 00caae6d47645e68d6e5277aceb69592b49381a6 (patch) | |
tree | c361aa0cea3093b93c1118266fe9e2b44ac6e453 /board/Arcturus | |
parent | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (diff) | |
download | u-boot-00caae6d47645e68d6e5277aceb69592b49381a6.tar.gz u-boot-00caae6d47645e68d6e5277aceb69592b49381a6.tar.xz u-boot-00caae6d47645e68d6e5277aceb69592b49381a6.zip |
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>
Diffstat (limited to 'board/Arcturus')
-rw-r--r-- | board/Arcturus/ucp1020/cmd_arc.c | 6 | ||||
-rw-r--r-- | board/Arcturus/ucp1020/ucp1020.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/board/Arcturus/ucp1020/cmd_arc.c b/board/Arcturus/ucp1020/cmd_arc.c index c32f7df454..0d3ac88fff 100644 --- a/board/Arcturus/ucp1020/cmd_arc.c +++ b/board/Arcturus/ucp1020/cmd_arc.c @@ -149,7 +149,7 @@ int get_arc_info(void) if (smac[2][0] == 0xFF) { printf("\t<not found>\n"); } else { - char *ret = getenv("ethaddr"); + char *ret = env_get("ethaddr"); if (strcmp(ret, __stringify(CONFIG_ETHADDR)) == 0) { env_set("ethaddr", smac[2]); @@ -169,7 +169,7 @@ int get_arc_info(void) if (smac[1][0] == 0xFF) { printf("\t<not found>\n"); } else { - char *ret = getenv("eth1addr"); + char *ret = env_get("eth1addr"); if (strcmp(ret, __stringify(CONFIG_ETH1ADDR)) == 0) { env_set("eth1addr", smac[1]); @@ -188,7 +188,7 @@ int get_arc_info(void) if (smac[0][0] == 0xFF) { printf("\t<not found>\n"); } else { - char *ret = getenv("eth2addr"); + char *ret = env_get("eth2addr"); if (strcmp(ret, __stringify(CONFIG_ETH2ADDR)) == 0) { env_set("eth2addr", smac[0]); diff --git a/board/Arcturus/ucp1020/ucp1020.c b/board/Arcturus/ucp1020/ucp1020.c index 2cc2e54d5b..dfdaf0441c 100644 --- a/board/Arcturus/ucp1020/ucp1020.c +++ b/board/Arcturus/ucp1020/ucp1020.c @@ -64,7 +64,7 @@ void board_gpio_init(void) for (i = 0; i < GPIO_MAX_NUM; i++) { sprintf(envname, "GPIO%d", i); - val = getenv(envname); + val = env_get(envname); if (val) { char direction = toupper(val[0]); char level = toupper(val[1]); @@ -82,7 +82,7 @@ void board_gpio_init(void) } } - val = getenv("PCIE_OFF"); + val = env_get("PCIE_OFF"); if (val) { gpio_direction_input(GPIO_PCIE1_EN); gpio_direction_input(GPIO_PCIE2_EN); @@ -91,7 +91,7 @@ void board_gpio_init(void) gpio_direction_output(GPIO_PCIE2_EN, 1); } - val = getenv("SDHC_CDWP_OFF"); + val = env_get("SDHC_CDWP_OFF"); if (!val) { ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); @@ -214,7 +214,7 @@ int last_stage_init(void) else printf("NCT72(0x%x): ready\n", id2); - kval = getenv("kernelargs"); + kval = env_get("kernelargs"); mmc = find_mmc_device(0); if (mmc) @@ -238,7 +238,7 @@ int last_stage_init(void) get_arc_info(); if (kval) { - sval = getenv("SERIAL"); + sval = env_get("SERIAL"); if (sval) { strcpy(newkernelargs, "SN="); strcat(newkernelargs, sval); |