diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 09:03:29 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:14 -0400 |
commit | 7e5f460ec457fe310156e399198a41eb0ce1e98c (patch) | |
tree | 7e89e4d15fcea2d2263c4b4af1be69905537ef42 /board/amlogic | |
parent | 031725f8cdf33e836d19f35d3fe82c5baa5a2976 (diff) | |
download | u-boot-7e5f460ec457fe310156e399198a41eb0ce1e98c.tar.gz |
global: Convert simple_strtoul() with hex to hextoul()
It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.
Add a proper comment to simple_strtoul() while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/amlogic')
-rw-r--r-- | board/amlogic/beelink-s922x/beelink-s922x.c | 2 | ||||
-rw-r--r-- | board/amlogic/odroid-n2/odroid-n2.c | 2 | ||||
-rw-r--r-- | board/amlogic/vim3/vim3.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/board/amlogic/beelink-s922x/beelink-s922x.c b/board/amlogic/beelink-s922x/beelink-s922x.c index bb74426266..adae27fc7e 100644 --- a/board/amlogic/beelink-s922x/beelink-s922x.c +++ b/board/amlogic/beelink-s922x/beelink-s922x.c @@ -39,7 +39,7 @@ int misc_init_r(void) tmp[0] = efuse_mac_addr[i * 2]; tmp[1] = efuse_mac_addr[i * 2 + 1]; tmp[2] = '\0'; - mac_addr[i] = simple_strtoul(tmp, NULL, 16); + mac_addr[i] = hextoul(tmp, NULL); } if (is_valid_ethaddr(mac_addr)) diff --git a/board/amlogic/odroid-n2/odroid-n2.c b/board/amlogic/odroid-n2/odroid-n2.c index 88a60f34fe..c37ea65417 100644 --- a/board/amlogic/odroid-n2/odroid-n2.c +++ b/board/amlogic/odroid-n2/odroid-n2.c @@ -126,7 +126,7 @@ int misc_init_r(void) tmp[0] = efuse_mac_addr[i * 2]; tmp[1] = efuse_mac_addr[i * 2 + 1]; tmp[2] = '\0'; - mac_addr[i] = simple_strtoul(tmp, NULL, 16); + mac_addr[i] = hextoul(tmp, NULL); } if (is_valid_ethaddr(mac_addr)) diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c index 18ef146218..5d9ac6458d 100644 --- a/board/amlogic/vim3/vim3.c +++ b/board/amlogic/vim3/vim3.c @@ -166,7 +166,7 @@ int misc_init_r(void) tmp[0] = efuse_mac_addr[i * 2]; tmp[1] = efuse_mac_addr[i * 2 + 1]; tmp[2] = '\0'; - mac_addr[i] = simple_strtoul(tmp, NULL, 16); + mac_addr[i] = hextoul(tmp, NULL); } if (is_valid_ethaddr(mac_addr)) |