From f6ae1a908034ad4320efba9742fbc505b993c347 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Thu, 15 Jun 2023 09:16:30 +0200 Subject: [PATCH] lib/fw_config: Make fw_config_is_provisioned() always available Move fw_config_is_provisioned() implementation to header file and make it static inline. Signed-off-by: Jakub Czapiga Change-Id: I2ea21b19339cd93ba78dbe25213cbfb40e012937 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75835 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner Reviewed-by: Eric Lai --- src/include/fw_config.h | 16 ++++++++++------ src/lib/fw_config.c | 5 ----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/include/fw_config.h b/src/include/fw_config.h index 9f5e4b83ad..1e1652efb6 100644 --- a/src/include/fw_config.h +++ b/src/include/fw_config.h @@ -49,6 +49,16 @@ struct fw_config_field { */ uint64_t fw_config_get(void); +/** + * fw_config_is_provisioned() - Determine if FW_CONFIG has been provisioned. + * Return %true if FW_CONFIG has been provisioned, %false otherwise. + */ +static inline bool fw_config_is_provisioned(void) +{ + return fw_config_get() != UNDEFINED_FW_CONFIG; +} + + #if CONFIG(FW_CONFIG) /** @@ -76,12 +86,6 @@ bool fw_config_probe(const struct fw_config *match); */ void fw_config_for_each_found(void (*cb)(const struct fw_config *config, void *arg), void *arg); -/** - * fw_config_is_provisioned() - Determine if FW_CONFIG has been provisioned. - * Return %true if FW_CONFIG has been provisioned, %false otherwise. - */ -bool fw_config_is_provisioned(void); - /** * fw_config_get_found() - Return a pointer to the fw_config struct for a given field. * @field_mask: A field mask from static.h, e.g., FW_CONFIG_FIELD_FEATURE_MASK diff --git a/src/lib/fw_config.c b/src/lib/fw_config.c index e1fbe74793..268be07b68 100644 --- a/src/lib/fw_config.c +++ b/src/lib/fw_config.c @@ -95,11 +95,6 @@ bool fw_config_probe(const struct fw_config *match) return false; } -bool fw_config_is_provisioned(void) -{ - return fw_config_get() != UNDEFINED_FW_CONFIG; -} - bool fw_config_probe_dev(const struct device *dev, const struct fw_config **matching_probe) { const struct fw_config *probe;