refactor(el3-spmc): avoid unneeded function call

The information is already available inline.  No functional change
intended.

Change-Id: I13d2ad62a9315b233d7a5fd3ffcaac3dd01b055c
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
This commit is contained in:
Demi Marie Obenour 2023-01-12 13:52:16 -05:00
parent 48ffc74c97
commit 1198ff8424

View file

@ -247,25 +247,6 @@ spmc_shmem_obj_get_comp_mrd(struct spmc_shmem_obj *obj, uint32_t ffa_version)
((uint8_t *)(&obj->desc) + emad->comp_mrd_offset);
}
/**
* spmc_shmem_obj_ffa_constituent_size - Calculate variable size part of obj.
* @obj: Object containing ffa_memory_region_descriptor.
*
* Return: Size of ffa_constituent_memory_region_descriptors in @obj.
*/
static size_t
spmc_shmem_obj_ffa_constituent_size(struct spmc_shmem_obj *obj,
uint32_t ffa_version)
{
struct ffa_comp_mrd *comp_mrd;
comp_mrd = spmc_shmem_obj_get_comp_mrd(obj, ffa_version);
if (comp_mrd == NULL) {
return 0;
}
return comp_mrd->address_range_count * sizeof(struct ffa_cons_mrd);
}
/**
* spmc_shmem_obj_validate_id - Validate a partition ID is participating in
* a given memory transaction.
@ -902,8 +883,7 @@ static int spmc_shmem_check_obj(struct spmc_shmem_obj *obj,
}
expected_size = offset + sizeof(*comp) +
spmc_shmem_obj_ffa_constituent_size(obj,
ffa_version);
count * sizeof(struct ffa_cons_mrd);
if (expected_size != obj->desc_size) {
WARN("%s: invalid object, computed size %zu != size %zu\n",