]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Fix compilation warnings for arm64
authorMichal Simek <michal.simek@xilinx.com>
Wed, 27 Apr 2016 14:07:20 +0000 (16:07 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 22 Jul 2016 12:03:54 +0000 (14:03 +0200)
Make code 64bit aware.

Warnings:
+../arch/arm/lib/spl.c: In function ‘jump_to_image_linux’:
+../arch/arm/lib/spl.c:63:3: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
+../common/spl/spl_fat.c: In function ‘spl_load_image_fat’:
+../common/spl/spl_fat.c:91:33: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/lib/spl.c
common/spl/spl_fat.c

index e42886840ed64865aaeabaed93678801e098a5dd..c1b85340fad6bcd0c78dfefefe8f3e649ed625a8 100644 (file)
@@ -60,7 +60,7 @@ void __noreturn jump_to_image_linux(void *arg)
        typedef void (*image_entry_arg_t)(int, int, void *)
                __attribute__ ((noreturn));
        image_entry_arg_t image_entry =
-               (image_entry_arg_t) spl_image.entry_point;
+               (image_entry_arg_t)(uintptr_t) spl_image.entry_point;
        cleanup_before_linux();
        image_entry(0, machid, arg);
 }
index db676186d354b7b07c1a96920f5ecd582f3adba3..73d33f54fc134b81c1169f97900102310d4729b6 100644 (file)
@@ -88,7 +88,8 @@ int spl_load_image_fat(struct blk_desc *block_dev,
                if (err)
                        goto end;
 
-               err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
+               err = file_fat_read(filename,
+                                   (u8 *)(uintptr_t)spl_image.load_addr, 0);
        }
 
 end: