SPM: Rename local handle pointer variable name
Rename the connection handle struct pointer name to
"handle" or "conn_handle" to indicate it is a handle
pointer.
The API "spm_get_handle_by_signal()" is used by IPC
backend only, fix the missing backend config macro of it.
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Change-Id: I705f6c4c63452d39d7bc142da90043b85a82854c
diff --git a/secure_fw/spm/ffm/backend_ipc.c b/secure_fw/spm/ffm/backend_ipc.c
index 9507b03..f43cfbc 100644
--- a/secure_fw/spm/ffm/backend_ipc.c
+++ b/secure_fw/spm/ffm/backend_ipc.c
@@ -46,13 +46,13 @@
* current thread and trigger scheduler.
*/
static psa_status_t ipc_messaging(struct service_t *service,
- struct conn_handle_t *hdl)
+ struct conn_handle_t *handle)
{
struct partition_t *p_owner = NULL;
psa_signal_t signal = 0;
struct critical_section_t cs_assert = CRITICAL_SECTION_STATIC_INIT;
- if (!hdl || !service || !service->p_ldinf || !service->partition) {
+ if (!handle || !service || !service->p_ldinf || !service->partition) {
return PSA_ERROR_PROGRAMMER_ERROR;
}
@@ -61,7 +61,7 @@
CRITICAL_SECTION_ENTER(cs_assert);
- UNI_LIST_INSERT_AFTER(p_owner, hdl, p_handles);
+ UNI_LIST_INSERT_AFTER(p_owner, handle, p_handles);
/* Messages put. Update signals */
p_owner->signals_asserted |= signal;
@@ -78,19 +78,19 @@
* thread.
*/
- if (!is_tfm_rpc_msg(hdl)) {
- thrd_wait_on(&hdl->ack_evnt, CURRENT_THREAD);
+ if (!is_tfm_rpc_msg(handle)) {
+ thrd_wait_on(&handle->ack_evnt, CURRENT_THREAD);
}
return PSA_SUCCESS;
}
-static psa_status_t ipc_replying(struct conn_handle_t *hdl, int32_t status)
+static psa_status_t ipc_replying(struct conn_handle_t *handle, int32_t status)
{
- if (is_tfm_rpc_msg(hdl)) {
- tfm_rpc_client_call_reply(hdl, status);
+ if (is_tfm_rpc_msg(handle)) {
+ tfm_rpc_client_call_reply(handle, status);
} else {
- thrd_wake_up(&hdl->ack_evnt, status);
+ thrd_wake_up(&handle->ack_evnt, status);
}
/*