android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gustavo A. R. Silva 2225000d62 MIPS: dec: prom: Address -Warray-bounds warning
[ Upstream commit 7b191b9b55df2a844bd32d1d380f47a7df1c2896 ]

Zero-length arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace zero-length array with flexible-array
member in struct memmap.

Address the following warning found after building (with GCC-13) mips64
with decstation_64_defconfig:
In function 'rex_setup_memory_region',
    inlined from 'prom_meminit' at arch/mips/dec/prom/memory.c:91:3:
arch/mips/dec/prom/memory.c:72:31: error: array subscript i is outside array bounds of 'unsigned char[0]' [-Werror=array-bounds=]
   72 |                 if (bm->bitmap[i] == 0xff)
      |                     ~~~~~~~~~~^~~
In file included from arch/mips/dec/prom/memory.c:16:
./arch/mips/include/asm/dec/prom.h: In function 'prom_meminit':
./arch/mips/include/asm/dec/prom.h:73:23: note: while referencing 'bitmap'
   73 |         unsigned char bitmap[0];

This helps with the ongoing efforts to globally enable -Warray-bounds.

This results in no differences in binary output.

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/323
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-30 16:27:09 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:19:25 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-27 08:37:18 +02:00
arm ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node 2023-08-11 11:54:02 +02:00
arm64 arm64: dts: stratix10: fix incorrect I2C property for SCL signal 2023-08-11 11:54:01 +02:00
c6x dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
csky dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
h8300
hexagon dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
m68k m68k/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
microblaze dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
mips MIPS: dec: prom: Address -Warray-bounds warning 2023-08-30 16:27:09 +02:00
nds32 dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:44:10 +02:00
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-17 11:35:53 +02:00
parisc init: Remove check_bugs() leftovers 2023-08-08 19:56:34 +02:00
powerpc powerpc/mm/altmap: Fix altmap boundary check 2023-08-11 11:54:00 +02:00
riscv
s390 KVM: s390: fix sthyi error handling 2023-08-11 11:53:55 +02:00
sh sh/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
sparc sparc/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
um um/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:56:34 +02:00
unicore32
x86 x86: Move gds_ucode_mitigated() declaration to header 2023-08-16 18:19:23 +02:00
xtensa init: Remove check_bugs() leftovers 2023-08-08 19:56:34 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 19:56:33 +02:00