diff options
author | Simon Glass <sjg@chromium.org> | 2017-01-16 07:03:55 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2017-02-06 11:38:46 +0800 |
commit | f196bd21be5adff8a3c16918f873479be1b81143 (patch) | |
tree | 2442e2364f71feedbafa612d2f7272282a320601 /arch/x86/lib | |
parent | b50b1633c022bd3bac5387ea37cf8bbb474e3d73 (diff) | |
download | u-boot-imx-f196bd21be5adff8a3c16918f873479be1b81143.zip u-boot-imx-f196bd21be5adff8a3c16918f873479be1b81143.tar.gz u-boot-imx-f196bd21be5adff8a3c16918f873479be1b81143.tar.bz2 |
x86: Tidy up use of size_t in relocation
Addresses should not be cast to size_t. Use uintptr_t instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/relocate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index d207fdd..1da5210 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -26,7 +26,7 @@ DECLARE_GLOBAL_DATA_PTR; int copy_uboot_to_ram(void) { - size_t len = (size_t)&__data_end - (size_t)&__text_start; + size_t len = (uintptr_t)&__data_end - (uintptr_t)&__text_start; if (gd->flags & GD_FLG_SKIP_RELOC) return 0; @@ -38,7 +38,7 @@ int copy_uboot_to_ram(void) int clear_bss(void) { ulong dst_addr = (ulong)&__bss_start + gd->reloc_off; - size_t len = (size_t)&__bss_end - (size_t)&__bss_start; + size_t len = (uintptr_t)&__bss_end - (uintptr_t)&__bss_start; if (gd->flags & GD_FLG_SKIP_RELOC) return 0; |