aboutsummaryrefslogtreecommitdiffstats
path: root/include/common
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-04-17 15:10:18 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-04-17 15:10:18 +0100
commitb3323cd6bddf38ba9e944b16573d429073d60723 (patch)
treef5672127319d6d625c3af6a92b1476f3459a8b0b /include/common
parent0f17a683246e20869395223215bb5e2f4fb1d81e (diff)
downloadplatform_external_arm-trusted-firmware-b3323cd6bddf38ba9e944b16573d429073d60723.tar.gz
platform_external_arm-trusted-firmware-b3323cd6bddf38ba9e944b16573d429073d60723.tar.bz2
platform_external_arm-trusted-firmware-b3323cd6bddf38ba9e944b16573d429073d60723.zip
Fix some MISRA defects in SPM code
Change-Id: I989c1f4aef8e3cb20d5d19e6347575e6449bb60b Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include/common')
-rw-r--r--include/common/runtime_svc.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h
index 5d9fa3908..706c2118d 100644
--- a/include/common/runtime_svc.h
+++ b/include/common/runtime_svc.h
@@ -102,15 +102,15 @@ CASSERT(RT_SVC_DESC_HANDLE == __builtin_offsetof(rt_svc_desc_t, handle), \
* oen is used to access an entry in the 'rt_svc_descs_indices' array. The entry
* contains the index of the service descriptor in the 'rt_svc_descs' array.
*/
-#define get_unique_oen(oen, call_type) ((oen & FUNCID_OEN_MASK) | \
- ((call_type & FUNCID_TYPE_MASK) \
- << FUNCID_OEN_WIDTH))
+#define get_unique_oen(oen, call_type) \
+ (((uint32_t)(oen) & FUNCID_OEN_MASK) | \
+ (((uint32_t)(call_type) & FUNCID_TYPE_MASK) << FUNCID_OEN_WIDTH))
/*
* This macro generates the unique owning entity number from the SMC Function
- * ID. This unique oen is used to access an entry in the
- * 'rt_svc_descs_indices' array to invoke the corresponding runtime service
- * handler during SMC handling.
+ * ID. This unique oen is used to access an entry in the 'rt_svc_descs_indices'
+ * array to invoke the corresponding runtime service handler during SMC
+ * handling.
*/
#define get_unique_oen_from_smc_fid(fid) \
get_unique_oen(((fid) >> FUNCID_OEN_SHIFT), \