Restore tee_internal_api.h constness 02/176802/3
authorIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Tue, 17 Apr 2018 09:46:11 +0000 (11:46 +0200)
committerIgor Kotrasinski <i.kotrasinsk@partner.samsung.com>
Mon, 4 Jun 2018 10:06:23 +0000 (12:06 +0200)
The specification uses a [ctx] specifier, which should, but is not required to
use const. Revert to using const to match existing code use cases.

Change-Id: Ied65fb18e0e5f7fd32cd5a5219fb5ccaf2895e21
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
helloworld/ta/hello_world.c
include/include/tee_internal_api.h

index c2ebc3d..9f8c65b 100644 (file)
@@ -61,7 +61,7 @@ TEE_Result TA_OpenSessionEntryPoint(uint32_t param_types,
        return TEE_SUCCESS;
 }
 
-void TA_CloseSessionEntryPoint(void *sess_ctx)
+void TA_CloseSessionEntryPoint(const void *sess_ctx)
 {
        (void)&sess_ctx;
        LOG_FUNC();
@@ -86,7 +86,7 @@ static TEE_Result inc_value(uint32_t param_types,
        return TEE_SUCCESS;
 }
 
-TEE_Result TA_InvokeCommandEntryPoint(void *sess_ctx,
+TEE_Result TA_InvokeCommandEntryPoint(const void *sess_ctx,
                                                                          uint32_t cmd_id,
                                                                          uint32_t param_types,
                                                                          TEE_Param params[4])
index f6c1b1c..b43b487 100644 (file)
@@ -280,7 +280,7 @@ TEE_Result TA_EXPORT TA_OpenSessionEntryPoint(uint32_t paramTypes,
  * @return his function can return no success or error code.
  *
  */
-void TA_EXPORT TA_CloseSessionEntryPoint(void* sessionContext);
+void TA_EXPORT TA_CloseSessionEntryPoint(const void* sessionContext);
 
 /**
  * Invokes a command within the given sessionContext
@@ -308,7 +308,7 @@ void TA_EXPORT TA_CloseSessionEntryPoint(void* sessionContext);
  * itself. In any case, the Implementation reports the error code to the client
  * with the origin @ref TEEC_ORIGIN_TRUSTED_APP.
  */
-TEE_Result TA_EXPORT TA_InvokeCommandEntryPoint(void* sessionContext,
+TEE_Result TA_EXPORT TA_InvokeCommandEntryPoint(const void* sessionContext,
     uint32_t commandID,
     uint32_t paramTypes,
     TEE_Param params[4]);