]> git.sur5r.net Git - u-boot/commitdiff
FIT: delete unnecessary casts
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 19 Sep 2013 03:10:18 +0000 (12:10 +0900)
committerTom Rini <trini@ti.com>
Fri, 20 Sep 2013 14:30:54 +0000 (10:30 -0400)
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 <yamada.m@jp.panasonic.com>
common/image-fdt.c
common/image-fit.c
common/image.c
tools/fit_image.c

index 2e22cca54e15d00d2d1aa804c63bb46b7cf68701..6f9ce7d37c227f81f15f0127fe5f1c6d9c8c3566 100644 (file)
@@ -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;
        }
index 7ebc33e93613c73b34310623420fb563be99eee5..cf4b67e3e832dfbe29acfabb15a53e3248b81c47 100644 (file)
@@ -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;
        }
index 802a79e902f8c22221d722f9487c9b7873a655de..b0ae58ff3e8cbaf3b82aaa04c3c63d2303e91795 100644 (file)
@@ -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
index 47beaaff2a2836850746ebee3d27707b4aad24a1..0400a606785457c8711eaa2bf85b51768aa180f6 100644 (file)
@@ -23,7 +23,7 @@ static image_header_t header;
 static int fit_verify_header (unsigned char *ptr, int image_size,
                        struct mkimage_params *params)
 {
-       return fdt_check_header ((void *)ptr);
+       return fdt_check_header(ptr);
 }
 
 static int fit_check_image_types (uint8_t type)