From 88dcb3179b4b78a2376609577ae4dd4327fb59c7 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 26 Apr 2021 17:10:28 +0200 Subject: src: Retype option API to use unsigned integers The CMOS option system does not support negative integers. Thus, retype and rename the option API functions to reflect this. Change-Id: Id3480e5cfc0ec90674def7ef0919e0b7ac5b19b3 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/52672 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph Reviewed-by: Nico Huber Reviewed-by: Felix Singer --- src/include/option.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/option.h b/src/include/option.h index 4de032bd49..e7db02e88a 100644 --- a/src/include/option.h +++ b/src/include/option.h @@ -10,7 +10,7 @@ void sanitize_cmos(void); enum cb_err cmos_set_option(const char *name, void *val); enum cb_err cmos_get_option(void *dest, const char *name); -static inline enum cb_err set_int_option(const char *name, int value) +static inline enum cb_err set_uint_option(const char *name, unsigned int value) { if (CONFIG(USE_OPTION_TABLE)) return cmos_set_option(name, &value); @@ -18,10 +18,10 @@ static inline enum cb_err set_int_option(const char *name, int value) return CB_CMOS_OTABLE_DISABLED; } -static inline int get_int_option(const char *name, const int fallback) +static inline int get_uint_option(const char *name, const unsigned int fallback) { if (CONFIG(USE_OPTION_TABLE)) { - int value = 0; + unsigned int value = 0; if (cmos_get_option(&value, name) == CB_SUCCESS) return value; } -- cgit v1.2.3