aboutsummaryrefslogtreecommitdiffstats
path: root/plat
diff options
context:
space:
mode:
authorDaniel Boulby <daniel.boulby@arm.com>2018-05-14 17:18:58 +0100
committerDaniel Boulby <daniel.boulby@arm.com>2018-06-12 13:21:36 +0100
commita138f7687159685175ee8f249dbe7ea1c22e90e1 (patch)
tree0ef8c691f679fd4a674392bf9ef6c4de0e8165c5 /plat
parent40692923882928ce52b61bfae1e5507b0076f105 (diff)
downloadplatform_external_arm-trusted-firmware-a138f7687159685175ee8f249dbe7ea1c22e90e1.tar.gz
platform_external_arm-trusted-firmware-a138f7687159685175ee8f249dbe7ea1c22e90e1.tar.bz2
platform_external_arm-trusted-firmware-a138f7687159685175ee8f249dbe7ea1c22e90e1.zip
Fix MISRA Rule 5.7 Part 2
Follow convention of shorter names for smaller scope to fix violations of MISRA rule 5.7 To prevent violation of directive 4.5 having variable name channel in css_pm_scmi.c not being typographically ambiguous change macro argument CHANNEL in css_mhu_doorbell.h change argument to _channel to fit with our convention which is a permitted exception of directive 4.5 for this project Rule 5.7: A tag name shall be a unique identifier Fixed for: make LOG_LEVEL=50 PLAT=juno Change-Id: I147cdb13553e83ed7df19149b282706db115d612 Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Diffstat (limited to 'plat')
-rw-r--r--plat/arm/css/drivers/mhu/css_mhu_doorbell.h4
-rw-r--r--plat/arm/css/drivers/scp/css_pm_scmi.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/plat/arm/css/drivers/mhu/css_mhu_doorbell.h b/plat/arm/css/drivers/mhu/css_mhu_doorbell.h
index 3c9453688..cb75ed050 100644
--- a/plat/arm/css/drivers/mhu/css_mhu_doorbell.h
+++ b/plat/arm/css/drivers/mhu/css_mhu_doorbell.h
@@ -18,8 +18,8 @@
#define MHU_V2_ACCESS_REQ_OFFSET 0xF88
#define MHU_V2_ACCESS_READY_OFFSET 0xF8C
-#define SENDER_REG_STAT(CHANNEL) (0x20 * (CHANNEL))
-#define SENDER_REG_SET(CHANNEL) (0x20 * (CHANNEL)) + 0xC
+#define SENDER_REG_STAT(_channel) (0x20 * (_channel))
+#define SENDER_REG_SET(_channel) ((0x20 * (_channel)) + 0xC)
/* Helper macro to ring doorbell */
#define MHU_RING_DOORBELL(addr, modify_mask, preserve_mask) do { \
diff --git a/plat/arm/css/drivers/scp/css_pm_scmi.c b/plat/arm/css/drivers/scp/css_pm_scmi.c
index e484c6011..3a255096e 100644
--- a/plat/arm/css/drivers/scp/css_pm_scmi.c
+++ b/plat/arm/css/drivers/scp/css_pm_scmi.c
@@ -69,7 +69,7 @@ typedef enum {
static void *scmi_handle;
/* The SCMI channel global object */
-static scmi_channel_t scmi_channel;
+static scmi_channel_t channel;
ARM_INSTANTIATE_LOCK;
@@ -308,9 +308,9 @@ scmi_channel_plat_info_t plat_css_scmi_plat_info = {
void plat_arm_pwrc_setup(void)
{
- scmi_channel.info = &plat_css_scmi_plat_info;
- scmi_channel.lock = ARM_LOCK_GET_INSTANCE;
- scmi_handle = scmi_init(&scmi_channel);
+ channel.info = &plat_css_scmi_plat_info;
+ channel.lock = ARM_LOCK_GET_INSTANCE;
+ scmi_handle = scmi_init(&channel);
if (scmi_handle == NULL) {
ERROR("SCMI Initialization failed\n");
panic();