fix(lib/realm): fix MISRA C:2012 Rule 10.1,4 in buffer.c
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
Change-Id: I6b3539ed7053b908667231ec41cd984ef2c66583
diff --git a/lib/realm/src/include/buffer_private.h b/lib/realm/src/include/buffer_private.h
index d71f91f..5034d08 100644
--- a/lib/realm/src/include/buffer_private.h
+++ b/lib/realm/src/include/buffer_private.h
@@ -11,8 +11,8 @@
* needs to be a power of two, so round NR_CPU_SLOTS up to the closest
* power of two.
*/
-#define ROUNDED_NR_CPU_SLOTS (1ULL << (64ULL - \
- __builtin_clzll((NR_CPU_SLOTS) - 1)))
+#define ROUNDED_NR_CPU_SLOTS \
+ (1ULL << (64U - (unsigned int)__builtin_clzll((NR_CPU_SLOTS) - 1U)))
#define RMM_SLOT_BUF_VA_SIZE ((ROUNDED_NR_CPU_SLOTS) * (GRANULE_SIZE))