summaryrefslogtreecommitdiff
path: root/board/sifive
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-24 18:03:30 +0300
committerTom Rini <trini@konsulko.com>2021-08-02 20:32:14 +0300
commit0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch)
tree2d83815e93fc16decbaa5671fd660ade0ec74532 /board/sifive
parent7e5f460ec457fe310156e399198a41eb0ce1e98c (diff)
downloadu-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.xz
global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/sifive')
-rw-r--r--board/sifive/unmatched/hifive-platform-i2c-eeprom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/sifive/unmatched/hifive-platform-i2c-eeprom.c b/board/sifive/unmatched/hifive-platform-i2c-eeprom.c
index b230a71b3a..2b985b9b22 100644
--- a/board/sifive/unmatched/hifive-platform-i2c-eeprom.c
+++ b/board/sifive/unmatched/hifive-platform-i2c-eeprom.c
@@ -324,7 +324,7 @@ static void set_pcb_revision(char *string)
{
unsigned long p;
- p = simple_strtoul(string, &string, 10);
+ p = dectoul(string, &string);
if (p > U8_MAX) {
printf("%s must not be greater than %d\n", "PCB revision",
U8_MAX);
@@ -366,7 +366,7 @@ static void set_bom_variant(char *string)
{
unsigned long p;
- p = simple_strtoul(string, &string, 10);
+ p = dectoul(string, &string);
if (p > U8_MAX) {
printf("%s must not be greater than %d\n", "BOM variant",
U8_MAX);
@@ -389,7 +389,7 @@ static void set_product_id(char *string)
{
unsigned long p;
- p = simple_strtoul(string, &string, 10);
+ p = dectoul(string, &string);
if (p > U16_MAX) {
printf("%s must not be greater than %d\n", "Product ID",
U16_MAX);