mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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>
This commit is contained in:
parent
b50b1633c0
commit
f196bd21be
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue