Interface: Fix veneer function naming
Some veneer functions are named with "tfm_tfm_" prefix. It is confusing
and unfriendly to NS integration.
This patch unifies the prefix of all the veneer function as "tfm_"
- Fix the duplicated "tfm_" prefixes by checking secure function prefix
in tfm_veneer template.
- Replace all the "tfm_tfm_" prefixes with "tfm_".
Change-Id: Id658486f49f4a6f1f22fd3897be27865889474ae
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/src/tfm_ps_func_api.c b/interface/src/tfm_ps_func_api.c
index 4674a35..ea6e1c8 100644
--- a/interface/src/tfm_ps_func_api.c
+++ b/interface/src/tfm_ps_func_api.c
@@ -22,10 +22,9 @@
{ .base = &create_flags, .len = sizeof(create_flags) }
};
- status = tfm_ns_interface_dispatch(
- (veneer_fn)tfm_tfm_ps_set_req_veneer,
- (uint32_t)in_vec, IOVEC_LEN(in_vec),
- (uint32_t)NULL, 0);
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_ps_set_req_veneer,
+ (uint32_t)in_vec, IOVEC_LEN(in_vec),
+ (uint32_t)NULL, 0);
/* A parameter with a buffer pointer pointer that has data length longer
* than maximum permitted is treated as a secure violation.
@@ -57,10 +56,9 @@
return PSA_ERROR_INVALID_ARGUMENT;
}
- status = tfm_ns_interface_dispatch(
- (veneer_fn)tfm_tfm_ps_get_req_veneer,
- (uint32_t)in_vec, IOVEC_LEN(in_vec),
- (uint32_t)out_vec, IOVEC_LEN(out_vec));
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_ps_get_req_veneer,
+ (uint32_t)in_vec, IOVEC_LEN(in_vec),
+ (uint32_t)out_vec, IOVEC_LEN(out_vec));
*p_data_length = out_vec[0].len;
@@ -79,10 +77,9 @@
{ .base = p_info, .len = sizeof(*p_info) }
};
- status = tfm_ns_interface_dispatch(
- (veneer_fn)tfm_tfm_ps_get_info_req_veneer,
- (uint32_t)in_vec, IOVEC_LEN(in_vec),
- (uint32_t)out_vec, IOVEC_LEN(out_vec));
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_ps_get_info_req_veneer,
+ (uint32_t)in_vec, IOVEC_LEN(in_vec),
+ (uint32_t)out_vec, IOVEC_LEN(out_vec));
return status;
}
@@ -94,10 +91,9 @@
{ .base = &uid, .len = sizeof(uid) }
};
- status = tfm_ns_interface_dispatch(
- (veneer_fn)tfm_tfm_ps_remove_req_veneer,
- (uint32_t)in_vec, IOVEC_LEN(in_vec),
- (uint32_t)NULL, 0);
+ status = tfm_ns_interface_dispatch((veneer_fn)tfm_ps_remove_req_veneer,
+ (uint32_t)in_vec, IOVEC_LEN(in_vec),
+ (uint32_t)NULL, 0);
return status;
}
@@ -135,10 +131,9 @@
{ .base = &support_flags, .len = sizeof(support_flags) }
};
- (void)tfm_ns_interface_dispatch(
- (veneer_fn)tfm_tfm_ps_get_support_req_veneer,
- (uint32_t)NULL, 0,
- (uint32_t)out_vec, IOVEC_LEN(out_vec));
+ (void)tfm_ns_interface_dispatch((veneer_fn)tfm_ps_get_support_req_veneer,
+ (uint32_t)NULL, 0,
+ (uint32_t)out_vec, IOVEC_LEN(out_vec));
return support_flags;
}