[PATCH] KVM: arm64: Add break to default case in kvm_pgtable_stage2_pte_prot()
Oliver Upton
oupton at kernel.org
Tue Nov 25 13:25:19 PST 2025
On Tue, Nov 25, 2025 at 07:42:48PM +0000, Marc Zyngier wrote:
> On Tue, 25 Nov 2025 17:59:15 +0000,
> Nathan Chancellor <nathan at kernel.org> wrote:
> >
> > 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 at kernel.org>
>
> Acked-by: Marc Zyngier <maz at kernel.org>
Thank you both for addressing the pile-up of issues I managed to
introduce :) Online now, will apply in just a moment.
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list