Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/55023 )
Change subject: arch/x86/acpi_bert_storage: change return type of bert_errors_present ......................................................................
arch/x86/acpi_bert_storage: change return type of bert_errors_present
The return value is a boolean, so use the bool type. Also add the types.h header to have the bool type defined.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I13d6472deeb26ba92d257761df069e32d9b2e5d4 --- M src/arch/x86/acpi_bert_storage.c M src/arch/x86/include/arch/bert_storage.h 2 files changed, 4 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/55023/1
diff --git a/src/arch/x86/acpi_bert_storage.c b/src/arch/x86/acpi_bert_storage.c index b07b67e..550f4a3 100644 --- a/src/arch/x86/acpi_bert_storage.c +++ b/src/arch/x86/acpi_bert_storage.c @@ -8,6 +8,7 @@ #include <acpi/acpi.h> #include <arch/bert_storage.h> #include <string.h> +#include <types.h>
/* BERT region management: Allow the chipset to determine the specific * location of the BERT region. We find that base and size, then manage @@ -32,7 +33,7 @@ return bert_region_broken ? 0 : bert_region_size - bert_region_used; }
-int bert_errors_present(void) +bool bert_errors_present(void) { return bert_region_broken ? 0 : !!bert_region_used; } diff --git a/src/arch/x86/include/arch/bert_storage.h b/src/arch/x86/include/arch/bert_storage.h index 0d373e1..6378333 100644 --- a/src/arch/x86/include/arch/bert_storage.h +++ b/src/arch/x86/include/arch/bert_storage.h @@ -3,8 +3,8 @@ #ifndef _BERT_STORAGE_H_ #define _BERT_STORAGE_H_
-#include <stdint.h> #include <acpi/acpi.h> +#include <types.h>
/* Items in the BERT region * @@ -55,7 +55,7 @@ /* Get amount of available storage left for error info */ size_t bert_storage_remaining(void); /* Find if errors were added, a BERT region is present, and ACPI table needed */ -int bert_errors_present(void); +bool bert_errors_present(void);
/* Get the number of entries associated with status */ static inline size_t bert_entry_count(acpi_generic_error_status_t *status)