From 7e5f460ec457fe310156e399198a41eb0ce1e98c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 09:03:29 -0600 Subject: 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 --- board/amlogic/odroid-n2/odroid-n2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/amlogic/odroid-n2/odroid-n2.c') 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)) -- cgit v1.2.1