]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(versal-net): resolve misra rule 20.7 warnings
authorJay Buddhabhatti <jay.buddhabhatti@amd.com>
Mon, 9 Jan 2023 12:46:54 +0000 (04:46 -0800)
committerJay Buddhabhatti <jay.buddhabhatti@amd.com>
Tue, 10 Jan 2023 10:16:19 +0000 (02:16 -0800)
Fix below MISRA violation from versal_net_def.h:
 - MISRA Violation: MISRA-C:2012 R.10.6:
   - Macro parameter expands into an expression without being wrapped
     by parentheses.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Change-Id: Ie365d24c02bb38163005a3c073642d5c96412e2d

plat/xilinx/versal_net/include/versal_net_def.h

index 45e240e710aa65bcacca07448d42cdaa3657dae3..e370934fff36b2bfba0059c1b4bd03914d5c9b5b 100644 (file)
 
 #define CORE_0_IEN_POWER_OFFSET                        (0x00000018ULL)
 #define APU_PCIL_CORE_X_IEN_POWER_REG(cpu_id)  (APU_PCLI + (CORE_0_IEN_POWER_OFFSET + \
-                                                (APU_PCLI_CPU_STEP * cpu_id)))
+                                                (APU_PCLI_CPU_STEP * (cpu_id))))
 #define APU_PCIL_CORE_X_IEN_POWER_MASK         (0x00000001U)
 #define CORE_0_IDS_POWER_OFFSET                        (0x0000001CULL)
 #define APU_PCIL_CORE_X_IDS_POWER_REG(cpu_id)  (APU_PCLI + (CORE_0_IDS_POWER_OFFSET + \
-                                                (APU_PCLI_CPU_STEP * cpu_id)))
+                                                (APU_PCLI_CPU_STEP * (cpu_id))))
 #define APU_PCIL_CORE_X_IDS_POWER_MASK         (0x00000001U)
 #define CORE_PWRDN_EN_BIT_MASK                 (0x1U)