mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! security: optee: add helpers to register OF overlays
Date: Thu, 26 Feb 2026 11:20:41 +0100	[thread overview]
Message-ID: <20260226102044.1746261-1-a.fatoum@pengutronix.de> (raw)

security: optee: fixup: emit stubs if CONFIG_OF_FIXUP_OPTEE disabled

sandbox allyesconfig build fails, because it has CONFIG_HAVE_OPTEE=y,
but no CONFIG_OF_FIXUP_OPTEE.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/tee/optee.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/tee/optee.h b/include/tee/optee.h
index 535811278d21..c25a9922e3d8 100644
--- a/include/tee/optee.h
+++ b/include/tee/optee.h
@@ -38,8 +38,6 @@ int optee_verify_header (const struct optee_header *hdr);
 void optee_set_membase(const struct optee_header *hdr);
 int optee_get_membase(u64 *membase);
 void optee_handoff_overlay(void *ovl, unsigned int ovl_sz);
-void optee_register_overlay(void);
-bool optee_overlay_registered(void);
 
 #else
 
@@ -56,6 +54,12 @@ static inline void optee_handoff_overlay(void *ovl, unsigned int ovl_sz)
 {
 }
 
+#endif /* CONFIG_HAVE_OPTEE */
+
+#ifdef CONFIG_OF_FIXUP_OPTEE
+void optee_register_overlay(void);
+bool optee_overlay_registered(void);
+#else
 static inline void optee_register_overlay(void)
 {
 }
@@ -64,8 +68,7 @@ static inline bool optee_overlay_registered(void)
 {
 	return false;
 }
-
-#endif /* CONFIG_HAVE_OPTEE */
+#endif /* CONFIG_OF_FIXUP_OPTEE */
 
 #ifdef __PBL__
 
-- 
2.47.3




             reply	other threads:[~2026-02-26 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26 10:20 Ahmad Fatoum [this message]
2026-02-26 12:08 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260226102044.1746261-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox