mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] optee: fix use of IS_ENABLED() on option without CONFIG_ prefix
@ 2024-10-16  8:52 Ahmad Fatoum
  2024-10-18  8:44 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-10-16  8:52 UTC (permalink / raw)
  To: barebox; +Cc: rcz, mfe, Ahmad Fatoum

IS_ENABLED() is meant to be used on options with their CONFIG_ prefix,
fix that and while at it use the recently added more descriptive
CONFIG_ARM32, CONFIG_ARM64 config symbols.

Fixes: 5f2f1f5fc1a9 ("optee: add support to verify 64-bit headers as well")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/optee.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/optee.c b/common/optee.c
index 31442b1a498d..422bc1c90924 100644
--- a/common/optee.c
+++ b/common/optee.c
@@ -25,13 +25,13 @@ int optee_verify_header(const struct optee_header *hdr)
 		return -EINVAL;
 	}
 
-	if (IS_ENABLED(CPU_V7) &&
+	if (IS_ENABLED(CONFIG_ARM32) &&
 	    (hdr->arch != OPTEE_ARCH_ARM32 || hdr->init_load_addr_hi)) {
 		pr_err("Wrong OP-TEE Arch for ARM v7 CPU\n");
 		return -EINVAL;
 	}
 
-	if (IS_ENABLED(CPU_V8) && hdr->arch != OPTEE_ARCH_ARM64) {
+	if (IS_ENABLED(CONFIG_ARM64) && hdr->arch != OPTEE_ARCH_ARM64) {
 		pr_err("Wrong OP-TEE Arch for ARM v8 CPU\n");
 		return -EINVAL;
 	}
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-18  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16  8:52 [PATCH] optee: fix use of IS_ENABLED() on option without CONFIG_ prefix Ahmad Fatoum
2024-10-18  8:44 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox