summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@benettiengineering.com>2022-12-13 20:24:03 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-06 07:46:31 +0100
commit243ddedfa0d29a272c61619b4948c5a4d4a272d6 (patch)
tree3114425a5efbf89d1993b925962962ab9c61beae /arch
parentf97eb0ab066133483a65c93eb894748de2f6b598 (diff)
downloadlinux-stable-243ddedfa0d29a272c61619b4948c5a4d4a272d6.tar.gz
linux-stable-243ddedfa0d29a272c61619b4948c5a4d4a272d6.tar.bz2
linux-stable-243ddedfa0d29a272c61619b4948c5a4d4a272d6.zip
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: <stable@vger.kernel.org> # 4.14.x + Fixes: 340a982825f7 ("ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation") Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/nommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index d58dd8af2cf0..05659be8751a 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -379,7 +379,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);