From 868f336dd9ac1e1c215acc167dd33783473f03bb Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sun, 25 Jul 2021 15:07:25 +0200 Subject: [PATCH] s390/boot: get rid of arithmetics on function pointers sparse warning: CHECK arch/s390/boot/startup.c arch/s390/boot/startup.c:283:39: error: arithmetics on pointers to functions Signed-off-by: Heiko Carstens --- arch/s390/boot/startup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 80c9ac71dea36..6188be11de57c 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -280,7 +280,7 @@ void startup_kernel(void) __kaslr_offset = random_lma - vmlinux.default_lma; img = (void *)vmlinux.default_lma; vmlinux.default_lma += __kaslr_offset; - vmlinux.entry += __kaslr_offset; + *(unsigned long *)(&vmlinux.entry) += __kaslr_offset; vmlinux.bootdata_off += __kaslr_offset; vmlinux.bootdata_preserved_off += __kaslr_offset; vmlinux.rela_dyn_start += __kaslr_offset; -- 2.39.5