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 --- common/fdt_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/fdt_support.c') diff --git a/common/fdt_support.c b/common/fdt_support.c index 240f1e57d1..4341d84bd5 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -579,7 +579,7 @@ void fdt_fixup_ethernet(void *fdt) for (j = 0; j < 6; j++) { mac_addr[j] = tmp ? - simple_strtoul(tmp, &end, 16) : 0; + hextoul(tmp, &end) : 0; if (tmp) tmp = (*end) ? end + 1 : end; } -- cgit v1.2.3