linux-stable/arch/arm/common
Arnd Bergmann 34186b48d2
ARM: sharpsl_param: work around -Wstringop-overread warning
gcc warns that accessing a pointer based on a numeric constant may
be an offset into a NULL pointer, and would therefore has zero
accessible bytes:

arch/arm/common/sharpsl_param.c: In function ‘sharpsl_save_param’:
arch/arm/common/sharpsl_param.c:43:9: error: ‘memcpy’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread]
   43 |         memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In this particular case, the warning is bogus since this is the actual
pointer, not an offset on a NULL pointer. Add a local variable to shut
up the warning and hope it doesn't come back.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Mack <daniel@zonque.org>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
Link: https://lore.kernel.org/r/20210927145332.2784005-1-arnd@kernel.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-10-05 15:44:56 +02:00
..
bL_switcher.c sched,bL_switcher: Convert to sched_set_fifo*() 2020-06-15 14:10:20 +02:00
bL_switcher_dummy_if.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dmabounce.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
firmware.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig ARM: Add Krait L2 register accessor functions 2018-10-17 13:14:33 -07:00
krait-l2-accessors.c ARM: Add Krait L2 register accessor functions 2018-10-17 13:14:33 -07:00
locomo.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
Makefile ARM: 8993/1: remove it8152 PCI controller driver 2020-07-21 16:33:41 +01:00
mcpm_entry.c docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
mcpm_head.S docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00
mcpm_platsmp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sa1111.c Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
scoop.c ARM: scoop: Use the right include 2019-09-03 22:09:46 +02:00
secure_cntvoff.S ARM: smp: Add initialization of CNTVOFF 2018-05-08 14:50:42 +02:00
sharpsl_param.c ARM: sharpsl_param: work around -Wstringop-overread warning 2021-10-05 15:44:56 +02:00
vlock.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
vlock.S docs: arm: convert docs to ReST and rename to *.rst 2019-07-15 09:20:24 -03:00