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 <jwerner@chromium.org> Change-Id: Iaec36210d129db26d51f0a105d3de070c03b686b Reviewed-on: https://review.coreboot.org/c/coreboot/+/62600 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
@ -53,19 +53,19 @@ size_t ulz4fn(const void *src, size_t srcn, void *dst, size_t dstn)
|
||||
return 0;
|
||||
}
|
||||
|
||||
cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name,
|
||||
union cbfs_mdata *mdata_out, size_t *data_offset_out)
|
||||
enum cb_err cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name,
|
||||
union cbfs_mdata *mdata_out, size_t *data_offset_out)
|
||||
{
|
||||
return CB_CBFS_CACHE_FULL;
|
||||
}
|
||||
|
||||
cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out,
|
||||
size_t *data_offset_out, struct vb2_hash *metadata_hash)
|
||||
enum cb_err cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out,
|
||||
size_t *data_offset_out, struct vb2_hash *metadata_hash)
|
||||
{
|
||||
assert_non_null(dev);
|
||||
check_expected(name);
|
||||
|
||||
cb_err_t ret = mock_type(cb_err_t);
|
||||
enum cb_err ret = mock_type(enum cb_err);
|
||||
if (ret != CB_SUCCESS)
|
||||
return ret;
|
||||
|
||||
@ -74,7 +74,7 @@ cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_o
|
||||
return CB_SUCCESS;
|
||||
}
|
||||
|
||||
static void expect_cbfs_lookup(const char *name, cb_err_t err, const union cbfs_mdata *mdata,
|
||||
static void expect_cbfs_lookup(const char *name, enum cb_err err, const union cbfs_mdata *mdata,
|
||||
size_t data_offset_out)
|
||||
{
|
||||
expect_string(cbfs_lookup, name, name);
|
||||
@ -91,7 +91,7 @@ const void *cbfs_find_attr(const union cbfs_mdata *mdata, uint32_t attr_tag, siz
|
||||
return mock_ptr_type(void *);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
*offset = 0;
|
||||
*size = 0;
|
||||
|
Reference in New Issue
Block a user