From 69cc557cfb6eb2cbb5b137bc206cd759c1dba5f0 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 4 Mar 2022 17:49:56 -0800 Subject: commonlib/bsd: Remove cb_err_t cb_err_t was meant to be used in place of `enum cb_err` in all situations, but the choice to use a typedef here seems to be controversial. We should not be arbitrarily using two different identifiers for the same thing across the codebase, so since there are no use cases for serializing enum cb_err at the moment (which would be the primary reason to typedef a fixed-width integer instead), remove cb_err_t again for now. Signed-off-by: Julius Werner Change-Id: Iaec36210d129db26d51f0a105d3de070c03b686b Reviewed-on: https://review.coreboot.org/c/coreboot/+/62600 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu Reviewed-by: Tim Wawrzynczak --- payloads/libpayload/libc/fmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'payloads/libpayload/libc') diff --git a/payloads/libpayload/libc/fmap.c b/payloads/libpayload/libc/fmap.c index 2d185a7c60..2ee9e3eeaa 100644 --- a/payloads/libpayload/libc/fmap.c +++ b/payloads/libpayload/libc/fmap.c @@ -38,8 +38,8 @@ /* Private fmap cache. */ static struct fmap *_fmap_cache; -static cb_err_t fmap_find_area(struct fmap *fmap, const char *name, size_t *offset, - size_t *size) +static enum cb_err fmap_find_area(struct fmap *fmap, const char *name, size_t *offset, + size_t *size) { for (size_t i = 0; i < le32toh(fmap->nareas); ++i) { if (strncmp((const char *)fmap->areas[i].name, name, FMAP_STRLEN) != 0) @@ -71,7 +71,7 @@ static bool fmap_setup_cache(void) return false; } -cb_err_t fmap_locate_area(const char *name, size_t *offset, size_t *size) +enum cb_err fmap_locate_area(const char *name, size_t *offset, size_t *size) { if (!_fmap_cache && !fmap_setup_cache()) return CB_ERR; -- cgit v1.2.3