From: Giulio Benetti Date: Tue, 13 Dec 2022 19:24:03 +0000 (+0100) Subject: ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment X-Git-Tag: v5.15.92~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b7dfd0a6811426c051404f704323ac0b451782a;p=platform%2Fkernel%2Flinux-rpi.git ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment commit a4e03921c1bb118e6718e0a3b0322a2c13ed172b upstream. zero_page is a void* pointer but memblock_alloc() returns phys_addr_t type so this generates a warning while using clang and with -Wint-error enabled that becomes and error. So let's cast the return of memblock_alloc() to (void *). Cc: # 4.14.x + Fixes: 340a982825f7 ("ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation") Signed-off-by: Giulio Benetti Signed-off-by: Russell King (Oracle) Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 88feffe..8061367 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -161,7 +161,7 @@ void __init paging_init(const struct machine_desc *mdesc) mpu_setup(); /* allocate the zero page. */ - zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE); + zero_page = (void *)memblock_alloc(PAGE_SIZE, PAGE_SIZE); if (!zero_page) panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, PAGE_SIZE, PAGE_SIZE);