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>
diff --git a/cmd/mvebu/comphy_rx_training.c b/cmd/mvebu/comphy_rx_training.c
index 0798dec..25a9e15 100644
--- a/cmd/mvebu/comphy_rx_training.c
+++ b/cmd/mvebu/comphy_rx_training.c
@@ -25,8 +25,8 @@
return -1;
}
- cp_index = simple_strtoul(argv[1], NULL, 16);
- comphy_index = simple_strtoul(argv[2], NULL, 16);
+ cp_index = hextoul(argv[1], NULL);
+ comphy_index = hextoul(argv[2], NULL);
ret = uclass_get(UCLASS_MISC, &uc);
if (ret) {