• Ian Campbell's avatar
    sparc: fix array bounds error setting up PCIC NMI trap · 4a0342ca
    Ian Campbell authored
      CC      arch/sparc/kernel/pcic.o
    arch/sparc/kernel/pcic.c: In function 'pcic_probe':
    arch/sparc/kernel/pcic.c:359:33: error: array subscript is above array bounds [-Werror=array-bounds]
    arch/sparc/kernel/pcic.c:359:8: error: array subscript is above array bounds [-Werror=array-bounds]
    arch/sparc/kernel/pcic.c:360:33: error: array subscript is above array bounds [-Werror=array-bounds]
    arch/sparc/kernel/pcic.c:360:8: error: array subscript is above array bounds [-Werror=array-bounds]
    arch/sparc/kernel/pcic.c:361:33: error: array subscript is above array bounds [-Werror=array-bounds]
    arch/sparc/kernel/pcic.c:361:8: error: array subscript is above array bounds [-Werror=array-bounds]
    cc1: all warnings being treated as errors
    
    I'm not particularly familiar with sparc but t_nmi (defined in head_32.S via
    the TRAP_ENTRY macro) and pcic_nmi_trap_patch (defined in entry.S) both appear
    to be 4 instructions long and I presume from the usage that instructions are
    int sized.
    Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: sparclinux@vger.kernel.org
    Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4a0342ca
pcic.c 24.2 KB