refactor(plat/ffa): refactor ffa_memory
* Rename `plat_ffa_memory_security_mode` to
`plat_ffa_memory_add_security_bit_from_mode`.
* Return from `plat_ffa_is_memory_send_valid` rather than mutating
`result` parameter.
* Extract calls to `FFA_MEM_RECLAIM` to a helper function
Change-Id: Ia2e992afbd492759100a2a9284cbc06050e48ab0
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/ffa_memory.c b/src/ffa_memory.c
index c4bf5ad..7e8d3e1 100644
--- a/src/ffa_memory.c
+++ b/src/ffa_memory.c
@@ -3405,8 +3405,8 @@
* Set the security state in the memory retrieve response attributes
* if specified by the target mode.
*/
- attributes = plat_ffa_memory_security_mode(memory_region->attributes,
- retrieve_mode);
+ attributes = plat_ffa_memory_add_security_bit_from_mode(
+ memory_region->attributes, retrieve_mode);
/*
* Constituents which we received in the first fragment should
@@ -3525,7 +3525,7 @@
* Set the security state in the memory retrieve response attributes
* if specified by the target mode.
*/
- attributes = plat_ffa_memory_security_mode(
+ attributes = plat_ffa_memory_add_security_bit_from_mode(
memory_region->attributes, share_state->sender_orig_mode);
receiver = ffa_memory_region_get_receiver(memory_region, 0);