[Linux-parport] [PATCH v2 2/7] sparc32: Fix build with trapbase

Andreas Larsson andreas at gaisler.com
Fri Mar 8 12:01:42 PST 2024


On 2024-02-24 18:42, Sam Ravnborg via B4 Relay wrote:
> From: Sam Ravnborg <sam at ravnborg.org>
> 
> 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 at ravnborg.org>
> Acked-by: Randy Dunlap <rdunlap at infradead.org>
> Tested-by: Randy Dunlap <rdunlap at infradead.org> # build-tested
> Cc: Andreas Larsson <andreas at gaisler.com>
> Cc: "David S. Miller" <davem at davemloft.net>
> ---
>  arch/sparc/kernel/irq_32.c   | 6 +++---
>  arch/sparc/kernel/kernel.h   | 8 ++++----
>  arch/sparc/kernel/kgdb_32.c  | 4 ++--
>  arch/sparc/kernel/leon_smp.c | 6 +++---
>  arch/sparc/kernel/setup_32.c | 4 ++--
>  5 files changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Andreas Larsson <andreas at gaisler.com>
Tested-by: Andreas Larsson <andreas at gaisler.com>

Picking this up to my for-next.

Thanks,
Andreas



More information about the Linux-parport mailing list