From d3775d46a43a47c521193229cfcb1c0d6cb4878b Mon Sep 17 00:00:00 2001
From: Daniel Boulby <daniel.boulby@arm.com>
Date: Fri, 4 May 2018 11:18:26 +0100
Subject: [PATCH] Fix MISRA Rule 5.3 Part 1

Conflict with function name and variable name within that function.
Change the name of the function from image_size to get_image_size
to remove conflict and make the function fit the normal project
naming convention.

Rule 5.3:  An identifier declared in an inner scope shall not
           hide an identifier declared in an outer scope

Fixed For:
    make LOG_LEVEL=50 PLAT=fvp

Change-Id: I1a63d2730113e2741fffa79730459c584b0224d7
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
---
 common/bl_common.c         | 2 +-
 include/common/bl_common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/bl_common.c b/common/bl_common.c
index 6b979f64a..af51c07d5 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -184,7 +184,7 @@ static void dump_load_info(uintptr_t image_load_addr,
 #endif /* LOAD_IMAGE_V2 */
 
 /* Generic function to return the size of an image */
-size_t image_size(unsigned int image_id)
+size_t get_image_size(unsigned int image_id)
 {
 	uintptr_t dev_handle;
 	uintptr_t image_handle;
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index c7c748729..f64e6aee6 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -207,7 +207,7 @@ typedef struct bl31_params {
 /*******************************************************************************
  * Function & variable prototypes
  ******************************************************************************/
-size_t image_size(unsigned int image_id);
+size_t get_image_size(unsigned int image_id);
 
 int is_mem_free(uintptr_t free_base, size_t free_size,
 		uintptr_t addr, size_t size);
-- 
GitLab