aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@linaro.org>2019-05-21 18:58:13 +0530
committerJérôme Forissier <jerome@forissier.org>2019-05-22 08:04:14 +0200
commitfde3a7f212f8cc318b393ffc82b5e2472de22f87 (patch)
tree3871a95c7c0cb37763fcf3ffb11a68fa34b193d2
parent559736d899a0e10d5f279a969b96429107b1697d (diff)
Remove redundant __noreturn from __utee_entry()
As __ta_entry() acts as function entry point, it makes sense to logically return from this api only via utee_return(). So remove redundant __noreturn from __utee_entry(). Fixes: eeb866c431db ("Add TA entry point function: __ta_entry()") Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r--lib/libutee/arch/arm/user_ta_entry.c5
-rw-r--r--lib/libutee/tee_api_private.h2
-rw-r--r--ta/arch/arm/user_ta_header.c14
3 files changed, 13 insertions, 8 deletions
diff --git a/lib/libutee/arch/arm/user_ta_entry.c b/lib/libutee/arch/arm/user_ta_entry.c
index 88559dc2..b0ca0138 100644
--- a/lib/libutee/arch/arm/user_ta_entry.c
+++ b/lib/libutee/arch/arm/user_ta_entry.c
@@ -182,7 +182,7 @@ static TEE_Result entry_invoke_command(unsigned long session_id,
return res;
}
-void __noreturn __utee_entry(unsigned long func, unsigned long session_id,
+TEE_Result __utee_entry(unsigned long func, unsigned long session_id,
struct utee_params *up, unsigned long cmd_id)
{
TEE_Result res;
@@ -211,5 +211,6 @@ void __noreturn __utee_entry(unsigned long func, unsigned long session_id,
break;
}
ta_header_save_params(0, NULL);
- utee_return(res);
+
+ return res;
}
diff --git a/lib/libutee/tee_api_private.h b/lib/libutee/tee_api_private.h
index d9c27952..336a239b 100644
--- a/lib/libutee/tee_api_private.h
+++ b/lib/libutee/tee_api_private.h
@@ -18,7 +18,7 @@ void __utee_from_param(struct utee_params *up, uint32_t param_types,
void __utee_to_param(TEE_Param params[TEE_NUM_PARAMS],
uint32_t *param_types, const struct utee_params *up);
-void __utee_entry(unsigned long func, unsigned long session_id,
+TEE_Result __utee_entry(unsigned long func, unsigned long session_id,
struct utee_params *up, unsigned long cmd_id);
diff --git a/ta/arch/arm/user_ta_header.c b/ta/arch/arm/user_ta_header.c
index a2aaaab6..dc726fd1 100644
--- a/ta/arch/arm/user_ta_header.c
+++ b/ta/arch/arm/user_ta_header.c
@@ -5,9 +5,10 @@
#include <compiler.h>
#include <tee_ta_api.h>
#include <tee_internal_api_extensions.h>
+#include <trace.h>
#include <user_ta_header.h>
#include <user_ta_header_defines.h>
-#include <trace.h>
+#include <utee_syscalls.h>
int trace_level = TRACE_LEVEL;
@@ -24,9 +25,8 @@ const char trace_ext_prefix[] = "TA";
/* exprted to user_ta_header.c, built within TA */
struct utee_params;
-void __utee_entry(unsigned long func, unsigned long session_id,
- struct utee_params *up, unsigned long cmd_id)
- __noreturn;
+TEE_Result __utee_entry(unsigned long func, unsigned long session_id,
+ struct utee_params *up, unsigned long cmd_id);
void __noreturn __ta_entry(unsigned long func, unsigned long session_id,
struct utee_params *up, unsigned long cmd_id);
@@ -34,7 +34,11 @@ void __noreturn __ta_entry(unsigned long func, unsigned long session_id,
void __noreturn __ta_entry(unsigned long func, unsigned long session_id,
struct utee_params *up, unsigned long cmd_id)
{
- __utee_entry(func, session_id, up, cmd_id);
+ TEE_Result res = TEE_SUCCESS;
+
+ res = __utee_entry(func, session_id, up, cmd_id);
+
+ utee_return(res);
}
/*