diff options
author | Johnny Lin <johnny_lin@wiwynn.com> | 2020-12-25 13:43:45 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-01-19 09:00:58 +0000 |
commit | 9918c34d87ea2c4f87651eea9ee833937d9e79f4 (patch) | |
tree | 03d76b4ea1dec3a5223dcc04bac1a69ea00303f4 /src/mainboard/ocp/deltalake/loglevel_vpd.c | |
parent | 418bc72d01f8662ff3e2bb4a96c800c369103b46 (diff) |
mb/ocp/deltalake: Make use of vpd_get_int to clean up code
Tested=On OCP Delta Lake, verify the VPD values can be read
correctly.
Change-Id: I1c27cb61cd52902c92b3733e53bc8e6fd6a5fe7f
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48908
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/mainboard/ocp/deltalake/loglevel_vpd.c')
-rw-r--r-- | src/mainboard/ocp/deltalake/loglevel_vpd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mainboard/ocp/deltalake/loglevel_vpd.c b/src/mainboard/ocp/deltalake/loglevel_vpd.c index 3faf37a0ea..78808797a8 100644 --- a/src/mainboard/ocp/deltalake/loglevel_vpd.c +++ b/src/mainboard/ocp/deltalake/loglevel_vpd.c @@ -9,10 +9,8 @@ int get_console_loglevel(void) { int log_level = COREBOOT_LOG_LEVEL_DEFAULT; - char val_str[VPD_LEN]; - if (vpd_gets(COREBOOT_LOG_LEVEL, val_str, VPD_LEN, VPD_RW_THEN_RO)) { - log_level = (int)atol(val_str); + if (vpd_get_int(COREBOOT_LOG_LEVEL, VPD_RW_THEN_RO, &log_level)) { if (log_level < 0 || log_level >= BIOS_NEVER) log_level = COREBOOT_LOG_LEVEL_DEFAULT; } |