linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Oliver Upton <oupton@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	llvm@lists.linux.dev, patches@lists.linux.dev
Subject: Re: [PATCH] KVM: arm64: Add break to default case in kvm_pgtable_stage2_pte_prot()
Date: Tue, 25 Nov 2025 19:42:48 +0000	[thread overview]
Message-ID: <87ecplgapz.wl-maz@kernel.org> (raw)
In-Reply-To: <20251125-arm64-kvm-hyp-pgtable-fix-c23-ext-warn-v1-1-98b506ddefbf@kernel.org>

On Tue, 25 Nov 2025 17:59:15 +0000,
Nathan Chancellor <nathan@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@kernel.org>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Jazz isn't dead. It just smells funny.


  reply	other threads:[~2025-11-25 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 17:59 [PATCH] KVM: arm64: Add break to default case in kvm_pgtable_stage2_pte_prot() Nathan Chancellor
2025-11-25 19:42 ` Marc Zyngier [this message]
2025-11-25 21:25   ` Oliver Upton
2025-11-25 21:25 ` Oliver Upton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ecplgapz.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=oupton@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).