summaryrefslogtreecommitdiff
path: root/plat
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2018-02-21 01:16:39 +0000
committerSoby Mathew <soby.mathew@arm.com>2018-02-26 16:31:11 +0000
commitda5f274572c063962556821914e2f64db5ae3d2d (patch)
tree0a23e2f3c17a912c7374e41a179a7a96d7136f40 /plat
parentce6d9643ad9c83b9183ea3f910aee88a22b13532 (diff)
Dynamic cfg: MISRA fixes
Change-Id: I1d85b76af002b8b672fcaeca94939b7420bc8243 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'plat')
-rw-r--r--plat/arm/board/fvp/fvp_bl2_setup.c1
-rw-r--r--plat/arm/board/fvp/fvp_bl31_setup.c1
-rw-r--r--plat/arm/common/arm_bl2_setup.c2
-rw-r--r--plat/arm/common/arm_dyn_cfg.c7
-rw-r--r--plat/arm/common/arm_dyn_cfg_helpers.c11
-rw-r--r--plat/common/plat_bl1_common.c2
6 files changed, 14 insertions, 10 deletions
diff --git a/plat/arm/board/fvp/fvp_bl2_setup.c b/plat/arm/board/fvp/fvp_bl2_setup.c
index 415de052..0a3b67d3 100644
--- a/plat/arm/board/fvp/fvp_bl2_setup.c
+++ b/plat/arm/board/fvp/fvp_bl2_setup.c
@@ -7,6 +7,7 @@
#include <generic_delay_timer.h>
#include <mmio.h>
#include <plat_arm.h>
+#include <platform.h>
#include <sp804_delay_timer.h>
#include <v2m_def.h>
#include "fvp_def.h"
diff --git a/plat/arm/board/fvp/fvp_bl31_setup.c b/plat/arm/board/fvp/fvp_bl31_setup.c
index 640dea1b..bcba60a3 100644
--- a/plat/arm/board/fvp/fvp_bl31_setup.c
+++ b/plat/arm/board/fvp/fvp_bl31_setup.c
@@ -6,6 +6,7 @@
#include <arm_config.h>
#include <plat_arm.h>
+#include <platform.h>
#include <smmu_v3.h>
#include "fvp_private.h"
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c
index 9a510127..7add61da 100644
--- a/plat/arm/common/arm_bl2_setup.c
+++ b/plat/arm/common/arm_bl2_setup.c
@@ -194,7 +194,7 @@ void arm_bl2_early_platform_setup(uintptr_t tb_fw_config, meminfo_t *mem_layout)
plat_arm_io_setup();
#if LOAD_IMAGE_V2
- if (tb_fw_config != 0)
+ if (tb_fw_config != 0U)
arm_bl2_set_tb_cfg_addr((void *)tb_fw_config);
#endif
}
diff --git a/plat/arm/common/arm_dyn_cfg.c b/plat/arm/common/arm_dyn_cfg.c
index a6fafb83..02f995f7 100644
--- a/plat/arm/common/arm_dyn_cfg.c
+++ b/plat/arm/common/arm_dyn_cfg.c
@@ -8,6 +8,7 @@
#include <assert.h>
#include <debug.h>
#include <desc_image_load.h>
+#include <plat_arm.h>
#include <platform.h>
#include <platform_def.h>
#include <string.h>
@@ -38,7 +39,7 @@ void arm_load_tb_fw_config(void)
VERBOSE("BL1: Loading TB_FW_CONFIG\n");
err = load_auth_image(TB_FW_CONFIG_ID, &arm_tb_fw_info.image_info);
- if (err) {
+ if (err != 0) {
/* Return if TB_FW_CONFIG is not loaded */
VERBOSE("Failed to load TB_FW_CONFIG\n");
return;
@@ -48,7 +49,7 @@ void arm_load_tb_fw_config(void)
/* The BL2 ep_info arg0 is modified to point to TB_FW_CONFIG */
image_desc = bl1_plat_get_image_desc(BL2_IMAGE_ID);
- assert(image_desc);
+ assert(image_desc != NULL);
image_desc->ep_info.args.arg0 = config_base;
INFO("BL1: TB_FW_CONFIG loaded at address = %p\n",
@@ -60,7 +61,7 @@ void arm_load_tb_fw_config(void)
*/
void arm_bl2_set_tb_cfg_addr(void *dtb)
{
- assert(dtb);
+ assert(dtb != NULL);
tb_fw_cfg_dtb = dtb;
}
diff --git a/plat/arm/common/arm_dyn_cfg_helpers.c b/plat/arm/common/arm_dyn_cfg_helpers.c
index afe44537..cfcbf2a2 100644
--- a/plat/arm/common/arm_dyn_cfg_helpers.c
+++ b/plat/arm/common/arm_dyn_cfg_helpers.c
@@ -8,6 +8,7 @@
#include <desc_image_load.h>
#include <fdt_wrappers.h>
#include <libfdt.h>
+#include <plat_arm.h>
/*******************************************************************************
* Helper to read the `hw_config` property in config DTB. This function
@@ -31,9 +32,9 @@ int arm_dyn_get_hwconfig_info(void *dtb, int node,
{
int err;
- assert(dtb);
- assert(hw_config_addr);
- assert(hw_config_size);
+ assert(dtb != NULL);
+ assert(hw_config_addr != NULL);
+ assert(hw_config_size != NULL);
/* Check if the pointer to DT is correct */
assert(fdt_check_header(dtb) == 0);
@@ -72,8 +73,8 @@ int arm_dyn_get_hwconfig_info(void *dtb, int node,
******************************************************************************/
int arm_dyn_tb_fw_cfg_init(void *dtb, int *node)
{
- assert(dtb);
- assert(node);
+ assert(dtb != NULL);
+ assert(node != NULL);
/* Check if the pointer to DT is correct */
if (fdt_check_header(dtb) != 0) {
diff --git a/plat/common/plat_bl1_common.c b/plat/common/plat_bl1_common.c
index a1972629..4b1f2334 100644
--- a/plat/common/plat_bl1_common.c
+++ b/plat/common/plat_bl1_common.c
@@ -89,7 +89,7 @@ int bl1_plat_handle_post_image_load(unsigned int image_id)
/* Get the image descriptor */
image_desc = bl1_plat_get_image_desc(BL2_IMAGE_ID);
- assert(image_desc);
+ assert(image_desc != NULL);
/* Get the entry point info */
ep_info = &image_desc->ep_info;