[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210912160149.2227137-4-linux@roeck-us.net>
Date: Sun, 12 Sep 2021 09:01:48 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
"James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-alpha@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
netdev@...r.kernel.org, linux-sparse@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>
Subject: [PATCH 3/4] parisc: Use absolute_pointer for memcmp on fixed memory location
parisc:allmodconfig fails to build with the following error
when using gcc 11.x.
arch/parisc/kernel/setup.c: In function 'start_parisc':
arch/parisc/kernel/setup.c:389:28: error:
'__builtin_memcmp_eq' specified bound 8 exceeds source size 0
Avoid the problem by using absolute_pointer() when providing a memory
address to memcmp().
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
arch/parisc/kernel/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index cceb09855e03..4e13345b6581 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -384,7 +384,7 @@ void __init start_parisc(void)
struct pdc_coproc_cfg coproc_cfg;
/* check QEMU/SeaBIOS marker in PAGE0 */
- running_on_qemu = (memcmp(&PAGE0->pad0, "SeaBIOS", 8) == 0);
+ running_on_qemu = (memcmp(absolute_pointer(&PAGE0->pad0), "SeaBIOS", 8) == 0);
cpunum = smp_processor_id();
--
2.33.0
Powered by blists - more mailing lists