summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2023-01-08 16:31:28 +0300
committerStefan Roese <sr@denx.de>2023-03-01 08:39:17 +0300
commite7813da07a21001fe13a1adf838bff43330091ca (patch)
tree45ccfd2ed2cb32de6315c1f53d22f8c34ab0c498 /cmd
parent4bf91e2203f8590b11d4aff86e3a4da6db221093 (diff)
downloadu-boot-e7813da07a21001fe13a1adf838bff43330091ca.tar.xz
cmd: mvebu/bubt: Rename variable image_size to hdr_size
Variable image_size contains size of the header, not size of the whole image. Rename this variable to reflect content. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mvebu/bubt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index df6b73c6a1..72ed87b89e 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -905,12 +905,12 @@ static int check_image_header(void)
u32 offset, size;
const struct a38x_main_hdr_v1 *hdr =
(struct a38x_main_hdr_v1 *)get_load_addr();
- const size_t image_size = a38x_header_size(hdr);
+ const size_t hdr_size = a38x_header_size(hdr);
- if (!image_size)
+ if (!hdr_size)
return -ENOEXEC;
- checksum = image_checksum8(hdr, image_size);
+ checksum = image_checksum8(hdr, hdr_size);
checksum -= hdr->checksum;
if (checksum != hdr->checksum) {
printf("Error: Bad A38x image header checksum. 0x%x != 0x%x\n",
@@ -944,7 +944,7 @@ static int check_image_header(void)
#if defined(CONFIG_ARMADA_38X)
static int a38x_image_is_secure(const struct a38x_main_hdr_v1 *hdr)
{
- u32 image_size = a38x_header_size(hdr);
+ const size_t hdr_size = a38x_header_size(hdr);
struct a38x_opt_hdr_v1 *ohdr;
u32 ohdr_size;
@@ -965,7 +965,7 @@ static int a38x_image_is_secure(const struct a38x_main_hdr_v1 *hdr)
break;
ohdr = (struct a38x_opt_hdr_v1 *)((u8 *)ohdr + ohdr_size);
- if ((u8 *)ohdr >= (u8 *)hdr + image_size)
+ if ((u8 *)ohdr >= (u8 *)hdr + hdr_size)
break;
} while (1);