sparc32: Fix build with trapbase
authorSam Ravnborg <sam@ravnborg.org>
Sat, 24 Feb 2024 17:42:23 +0000 (18:42 +0100)
committerAndreas Larsson <andreas@gaisler.com>
Fri, 8 Mar 2024 20:20:23 +0000 (21:20 +0100)
commit7bfba2ca462356331c735e68cff1cb7515150bad
tree19d13f0c2663c41a23e73e94efc419e41f3da270
parent802a8874a3889a4a0d218d4f73e5855c96d5b8a8
sparc32: Fix build with trapbase

Fix the following build errors:
irq_32.c:258:7: error: array subscript [16, 79] is outside array bounds of 'struct tt_entry[1]
irq_32.c:271:14: error: assignment to 'struct tt_entry *' from incompatible pointer type 'struct tt_entry (*)[]

trapbase is a pointer to an array of tt_entry, but the code declared it
as a pointer so the compiler see a single entry and not an array.
Fix this by modifyinf the declaration to be an array, and modify all
users to take the address of the first member.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "David S. Miller" <davem@davemloft.net>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20240224-sam-fix-sparc32-all-builds-v2-2-1f186603c5c4@ravnborg.org
arch/sparc/kernel/irq_32.c
arch/sparc/kernel/kernel.h
arch/sparc/kernel/kgdb_32.c
arch/sparc/kernel/leon_smp.c
arch/sparc/kernel/setup_32.c