fix(spmd): coverity scan issues
Coverity defects fixed by this patch are:
*** CID 400208: Performance inefficiencies (PASS_BY_VALUE)
/include/services/el3_spmd_logical_sp.h: 108 in
ffa_partition_info_regs_get_last_idx()
*** CID 400207: Performance inefficiencies (PASS_BY_VALUE)
/services/std_svc/spmd/spmd_logical_sp.c: 359 in
ffa_partition_info_regs_get_part_info()
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I9597377a8ec3d5519995e1619d99ee7102f33939
diff --git a/services/std_svc/spmd/spmd_logical_sp.c b/services/std_svc/spmd/spmd_logical_sp.c
index 964b36b..d992187 100644
--- a/services/std_svc/spmd/spmd_logical_sp.c
+++ b/services/std_svc/spmd/spmd_logical_sp.c
@@ -356,7 +356,7 @@
* other code to consume.
*/
bool ffa_partition_info_regs_get_part_info(
- struct ffa_value args, uint8_t idx,
+ struct ffa_value *args, uint8_t idx,
struct ffa_partition_info_v1_1 *partition_info)
{
uint64_t *arg_ptrs;
@@ -375,7 +375,7 @@
* function, arg1 is reserved, arg2 encodes indices. arg3 and greater
* values reflect partition properties.
*/
- arg_ptrs = (uint64_t *)&args + ((idx * 3) + 3);
+ arg_ptrs = (uint64_t *)args + ((idx * 3) + 3);
info = *arg_ptrs;
arg_ptrs++;