linux-stable/arch/powerpc/xmon
Gustavo A. R. Silva 784d559473 powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds
[ Upstream commit 1c4a4a4c84 ]

When building with automatic stack variable initialization, GCC 12
complains about variables defined outside of switch case statements.
Move the variable into the case that uses it, which silences the warning:

arch/powerpc/xmon/xmon.c: In function ‘bpt_cmds’:
arch/powerpc/xmon/xmon.c:1529:13: warning: statement will never be executed [-Wswitch-unreachable]
 1529 |         int mode;
      |             ^~~~

Fixes: 09b6c1129f ("powerpc/xmon: Fix compile error with PPC_8xx=y")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/YySE6FHiOcbWWR+9@work
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:26:34 +01:00
..
Makefile kbuild: introduce ccflags-remove-y and asflags-remove-y 2020-08-10 01:32:59 +09:00
ansidecl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dis-asm.h powerpc/xmon: Fix compile error in print_insn* functions 2020-01-26 00:11:35 +11:00
nonstdio.c powerpc/xmon: Change printk() to pr_cont() 2020-12-04 21:56:30 +11:00
nonstdio.h powerpc/xmon: Add __printf annotation to xmon_printf() 2018-05-25 12:04:36 +10:00
ppc-dis.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 76 2019-05-24 17:37:51 +02:00
ppc-opc.c powerpc: fix typos in comments 2022-05-05 22:12:44 +10:00
ppc.h powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
spr_access.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
spu-dis.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu-insns.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu-opc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
spu.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1 2019-05-21 11:28:39 +02:00
xmon.c powerpc/xmon: Fix -Wswitch-unreachable warning in bpt_cmds 2022-12-31 13:26:34 +01:00
xmon_bpts.S powerpc: Add prefixed instructions to instruction data type 2020-05-19 00:10:39 +10:00
xmon_bpts.h powerpc/inst: Define ppc_inst_t 2021-12-09 22:41:21 +11:00