diff mbox series

[v4,1/5] image: Add fallback for fit_config_verify

Message ID 20221212191211.2105335-2-sean.anderson@seco.com
State Accepted
Commit b5fd7b4a31e5098ff024ebc63bccfcb2b4429c82
Delegated to: Tom Rini
Headers show
Series cmd: source: Support specifying config name | expand

Commit Message

Sean Anderson Dec. 12, 2022, 7:12 p.m. UTC
Add a fallback for this function so it can be used without regard to
whether FIT_SIGNATURE is enabled or not.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

Changes in v4:
- New

 include/image.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Tom Rini Dec. 12, 2022, 7:14 p.m. UTC | #1
On Mon, Dec 12, 2022 at 02:12:07PM -0500, Sean Anderson wrote:

> Add a fallback for this function so it can be used without regard to
> whether FIT_SIGNATURE is enabled or not.
> 
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass Dec. 14, 2022, 4:39 a.m. UTC | #2
On Mon, 12 Dec 2022 at 11:13, Sean Anderson <sean.anderson@seco.com> wrote:
>
> Add a fallback for this function so it can be used without regard to
> whether FIT_SIGNATURE is enabled or not.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
> Changes in v4:
> - New
>
>  include/image.h | 7 +++++++
>  1 file changed, 7 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/include/image.h b/include/image.h
index 6f21dafba8..2a53c30486 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1258,7 +1258,14 @@  int fit_image_verify_with_data(const void *fit, int image_noffset,
 			       size_t size);
 
 int fit_image_verify(const void *fit, int noffset);
+#if CONFIG_IS_ENABLED(FIT_SIGNATURE)
 int fit_config_verify(const void *fit, int conf_noffset);
+#else
+static inline int fit_config_verify(const void *fit, int conf_noffset)
+{
+	return 0;
+}
+#endif
 int fit_all_image_verify(const void *fit);
 int fit_config_decrypt(const void *fit, int conf_noffset);
 int fit_image_check_os(const void *fit, int noffset, uint8_t os);