[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [PATCH v3 17/43] arm64: mm.c: fix the compiler error
The @_end is (unsigned int) type, and we will meet a compilor error: --------------------------------------- mm.c: In function ‘arch_init_mm’: mm.c:59:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] unsigned int end = (unsigned int) &_end; --------------------------------------- This patch converts the type to uintptr_t, and fix the error. Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> --- arch/arm/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm.c b/arch/arm/mm.c index 4c0b186..ef5f3f8 100644 --- a/arch/arm/mm.c +++ b/arch/arm/mm.c @@ -28,6 +28,7 @@ void arch_init_mm(unsigned long *start_pfn_p, unsigned long *max_pfn_p) int memory; int prop_len = 0; const uint64_t *regs; + uintptr_t end; printk(" _text: %p(VA)\n", &_text); printk(" _etext: %p(VA)\n", &_etext); @@ -56,7 +57,7 @@ void arch_init_mm(unsigned long *start_pfn_p, unsigned long *max_pfn_p) BUG(); } - unsigned int end = (unsigned int) &_end; + end = (uintptr_t) &_end; paddr_t mem_base = fdt64_to_cpu(regs[0]); uint64_t mem_size = fdt64_to_cpu(regs[1]); printk("Found memory at 0x%llx (len 0x%llx)\n", -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |