Commit 2f0877c7f4fa53ba4aedf2333908057a3f6ac413

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent 50c2a91b67

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 <yamada.m@jp.panasonic.com>

Showing 4 changed files with 4 additions and 8 deletions Side-by-side Diff

... ... @@ -55,7 +55,7 @@
55 55 fdt_error("uImage is compressed");
56 56 return NULL;
57 57 }
58   - if (fdt_check_header((char *)image_get_data(fdt_hdr)) != 0) {
  58 + if (fdt_check_header((void *)image_get_data(fdt_hdr)) != 0) {
59 59 fdt_error("uImage data is not a fdt");
60 60 return NULL;
61 61 }
... ... @@ -1596,7 +1596,7 @@
1596 1596 len = (ulong)size;
1597 1597  
1598 1598 /* verify that image data is a proper FDT blob */
1599   - if (image_type == IH_TYPE_FLATDT && fdt_check_header((char *)buf)) {
  1599 + if (image_type == IH_TYPE_FLATDT && fdt_check_header(buf)) {
1600 1600 puts("Subimage data is not a FDT");
1601 1601 return -ENOEXEC;
1602 1602 }
... ... @@ -652,17 +652,13 @@
652 652 {
653 653 ulong format = IMAGE_FORMAT_INVALID;
654 654 const image_header_t *hdr;
655   -#if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT)
656   - char *fit_hdr;
657   -#endif
658 655  
659 656 hdr = (const image_header_t *)img_addr;
660 657 if (image_check_magic(hdr))
661 658 format = IMAGE_FORMAT_LEGACY;
662 659 #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT)
663 660 else {
664   - fit_hdr = (char *)img_addr;
665   - if (fdt_check_header(fit_hdr) == 0)
  661 + if (fdt_check_header(img_addr) == 0)
666 662 format = IMAGE_FORMAT_FIT;
667 663 }
668 664 #endif
... ... @@ -23,7 +23,7 @@
23 23 static int fit_verify_header (unsigned char *ptr, int image_size,
24 24 struct mkimage_params *params)
25 25 {
26   - return fdt_check_header ((void *)ptr);
  26 + return fdt_check_header(ptr);
27 27 }
28 28  
29 29 static int fit_check_image_types (uint8_t type)