diff options
| author | Nathan Chancellor <nathan@kernel.org> | 2025-11-25 10:59:15 -0700 |
|---|---|---|
| committer | Oliver Upton <oupton@kernel.org> | 2025-12-01 00:44:02 -0800 |
| commit | d98a04dc190672bbd29654a159f7621e0c63adcf (patch) | |
| tree | 26d61ac08d7ab23c67b45d712e677a23ff4b1db5 /tools/testing/selftests/bpf/prog_tests/access_variable_array.c | |
| parent | b0fc8329ec98ea891a5e47821db6aee1d564bff6 (diff) | |
KVM: arm64: Add break to default case in kvm_pgtable_stage2_pte_prot()
Clang warns (or errors with CONFIG_WERROR=y / W=e):
arch/arm64/kvm/hyp/pgtable.c:757:2: error: label at end of compound statement is a C23 extension [-Werror,-Wc23-extensions]
757 | }
| ^
With older versions of clang (15 and older) and GCC (at least the minimum
supported, 8.1), this is an unconditional hard error:
arch/arm64/kvm/hyp/pgtable.c: In function 'kvm_pgtable_stage2_pte_prot':
arch/arm64/kvm/hyp/pgtable.c:756:2: error: label at end of compound statement
default:
^~~~~~~
arch/arm64/kvm/hyp/pgtable.c:756:10: error: label at end of compound statement: expected statement
default:
^
;
Add a break statement to this default case to clear up the error/warning.
Fixes: 2608563b466b ("KVM: arm64: Add support for FEAT_XNX stage-2 permissions")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://msgid.link/20251125-arm64-kvm-hyp-pgtable-fix-c23-ext-warn-v1-1-98b506ddefbf@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/access_variable_array.c')
0 files changed, 0 insertions, 0 deletions