diff options
| author | Taticharla Venkata Sai <venkatasai.taticharla@amd.com> | 2025-09-09 17:17:55 +0530 |
|---|---|---|
| committer | Venkata Sai Taticharla <venkatasai.taticharla@amd.com> | 2026-01-08 16:31:27 +0000 |
| commit | 6c61ed4d97782060d08539fcad28845dcd46cb0c (patch) | |
| tree | 201a2fe6260a804565db6efd0d9b415f16561c68 | |
| parent | c9535e669ef4e494b7afc612c8a32706ab3ebd0f (diff) | |
| download | arm-trusted-firmware-6c61ed4d97782060d08539fcad28845dcd46cb0c.tar.gz arm-trusted-firmware-6c61ed4d97782060d08539fcad28845dcd46cb0c.zip | |
fix(optee): add missing curly braces
This corrects the MISRA violation C2012-15.6:
The body of an iteration-statement or a selection-statement shall
be a compound-statement. Enclosed statement body within the curly
braces.
Change-Id: Ic8523f1d6ffa367c1ea3753de367a9c88008b55d
Signed-off-by: Taticharla Venkata Sai <venkatasai.taticharla@amd.com>
| -rw-r--r-- | services/spd/opteed/opteed_common.c | 9 | ||||
| -rw-r--r-- | services/spd/opteed/opteed_main.c | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/services/spd/opteed/opteed_common.c b/services/spd/opteed/opteed_common.c index b0b4204dd..4778b5f8f 100644 --- a/services/spd/opteed/opteed_common.c +++ b/services/spd/opteed/opteed_common.c @@ -40,19 +40,22 @@ void opteed_init_optee_ep_state(struct entry_point_info *optee_entry_point, /* initialise an entrypoint to set up the CPU context */ ep_attr = SECURE | EP_ST_ENABLE; - if ((read_sctlr_el3() & SCTLR_EE_BIT) != 0U) + if ((read_sctlr_el3() & SCTLR_EE_BIT) != 0U) { ep_attr |= EP_EE_BIG; + } SET_PARAM_HEAD(optee_entry_point, PARAM_EP, VERSION_1, ep_attr); optee_entry_point->pc = pc; - if (rw == OPTEE_AARCH64) + if (rw == OPTEE_AARCH64) { optee_entry_point->spsr = SPSR_64(MODE_EL1, MODE_SP_ELX, DISABLE_ALL_EXCEPTIONS); - else + } else { optee_entry_point->spsr = SPSR_MODE32(MODE32_svc, SPSR_T_ARM, SPSR_E_LITTLE, DAIF_FIQ_BIT | DAIF_IRQ_BIT | DAIF_ABT_BIT); + } + zeromem(&optee_entry_point->args, sizeof(optee_entry_point->args)); optee_entry_point->args.arg0 = arg0; optee_entry_point->args.arg1 = arg1; diff --git a/services/spd/opteed/opteed_main.c b/services/spd/opteed/opteed_main.c index c2c5c05dc..c43a4cc23 100644 --- a/services/spd/opteed/opteed_main.c +++ b/services/spd/opteed/opteed_main.c @@ -188,8 +188,9 @@ static int32_t opteed_setup(void) * signalling failure initializing the service. We bail out without * registering any handlers */ - if (optee_ep_info->pc == 0U) + if (optee_ep_info->pc == 0U) { return 1; + } #if TRANSFER_LIST tl = (void *)optee_ep_info->args.arg3; |
