From bc325c2cb6df83a9d41cb33175ef45935f6bc1c1 Mon Sep 17 00:00:00 2001 From: Daniel Boulby Date: Tue, 1 May 2018 12:19:26 +0100 Subject: [PATCH 1/2] Remove duplicate weak definition The weak pragma was assigned twice to the bl2_plat_handle_post_image_load definition both in plat/common/ and in plat/arm/common/ this was an error as it should have only have been defined in plat/common Change-Id: Id85e14c699cb09ed998d1677f2a172e760911918 Signed-off-by: Daniel Boulby --- plat/arm/common/arm_bl2_setup.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c index d490f83c82..d2da54d9b7 100644 --- a/plat/arm/common/arm_bl2_setup.c +++ b/plat/arm/common/arm_bl2_setup.c @@ -44,12 +44,7 @@ CASSERT(BL2_BASE >= (ARM_BL_RAM_BASE + BL1_MEMINFO_OFFSET), assert_bl2_base_over #pragma weak bl2_plat_arch_setup #pragma weak bl2_plat_sec_mem_layout -#if LOAD_IMAGE_V2 - -#pragma weak bl2_plat_handle_post_image_load - -#else /* LOAD_IMAGE_V2 */ - +#if !LOAD_IMAGE_V2 /******************************************************************************* * This structure represents the superset of information that is passed to * BL31, e.g. while passing control to it from BL2, bl31_params From c43f0464dacb421cf1c2a9d9c6375f6d97bf71c5 Mon Sep 17 00:00:00 2001 From: Daniel Boulby Date: Thu, 3 May 2018 17:11:04 +0100 Subject: [PATCH 2/2] Remove rt_svc_descs pointer from inner scope A pointer to rt_svc_desc_t was defined both in the function and globally. The innermost definition hid the global definition which is the one we want to use so remove the innermost definition to prevent this Change-Id: Idabdbc0947178ae83224bd17a9b170df7c278d51 Signed-off-by: Daniel Boulby --- common/runtime_svc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/runtime_svc.c b/common/runtime_svc.c index f997c74a04..e0d56095d6 100644 --- a/common/runtime_svc.c +++ b/common/runtime_svc.c @@ -38,7 +38,6 @@ uintptr_t handle_runtime_svc(uint32_t smc_fid, u_register_t x1, x2, x3, x4; int index; unsigned int idx; - const rt_svc_desc_t *rt_svc_descs; assert(handle); idx = get_unique_oen_from_smc_fid(smc_fid);