From 2f0877c7f4fa53ba4aedf2333908057a3f6ac413 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 19 Sep 2013 12:10:18 +0900 Subject: FIT: delete unnecessary casts Becuase fdt_check_header function takes (const void *) type argument, the argument should be passed to it without being casted to (char *). Signed-off-by: Masahiro Yamada --- common/image-fdt.c | 2 +- common/image-fit.c | 2 +- common/image.c | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/image-fdt.c b/common/image-fdt.c index 2e22cca..6f9ce7d 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -55,7 +55,7 @@ static const image_header_t *image_get_fdt(ulong fdt_addr) fdt_error("uImage is compressed"); return NULL; } - if (fdt_check_header((char *)image_get_data(fdt_hdr)) != 0) { + if (fdt_check_header((void *)image_get_data(fdt_hdr)) != 0) { fdt_error("uImage data is not a fdt"); return NULL; } diff --git a/common/image-fit.c b/common/image-fit.c index 7ebc33e..cf4b67e 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1596,7 +1596,7 @@ int fit_image_load(bootm_headers_t *images, const char *prop_name, ulong addr, len = (ulong)size; /* verify that image data is a proper FDT blob */ - if (image_type == IH_TYPE_FLATDT && fdt_check_header((char *)buf)) { + if (image_type == IH_TYPE_FLATDT && fdt_check_header(buf)) { puts("Subimage data is not a FDT"); return -ENOEXEC; } diff --git a/common/image.c b/common/image.c index 802a79e..b0ae58f 100644 --- a/common/image.c +++ b/common/image.c @@ -652,17 +652,13 @@ int genimg_get_format(const void *img_addr) { ulong format = IMAGE_FORMAT_INVALID; const image_header_t *hdr; -#if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) - char *fit_hdr; -#endif hdr = (const image_header_t *)img_addr; if (image_check_magic(hdr)) format = IMAGE_FORMAT_LEGACY; #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) else { - fit_hdr = (char *)img_addr; - if (fdt_check_header(fit_hdr) == 0) + if (fdt_check_header(img_addr) == 0) format = IMAGE_FORMAT_FIT; } #endif -- cgit v1.1