• Mark Brown's avatar
    arm64: insn: Add return statements after BUG_ON() · a9ae04c9
    Mark Brown authored
    Following a recent series of enhancements to the insn code the ARMv8
    allnoconfig build has been generating a large number of warnings in the
    form of:
    
    arch/arm64/kernel/insn.c:689:8: warning: 'insn' may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    This is because BUG() and related macros can be compiled out so we get
    execution paths which normally result in a panic compiling out to noops
    instead.
    
    I wasn't able to immediately identify a sensible return value to use in
    these cases so just return AARCH64_BREAK_FAULT - this is all "should
    never happen" code so hopefully it never has a practical impact.
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    [catalin.marinas@arm.com: AARCH64_BREAK_FAULT definition contributed by Daniel Borkmann]
    [catalin.marinas@arm.com: replace return 0 with AARCH64_BREAK_FAULT]
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    a9ae04c9
insn.c 22.3 KB