* linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728: Possible || and | mixup ?
@ 2025-10-20 11:12 David Binderman
2025-10-20 12:12 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: David Binderman @ 2025-10-20 11:12 UTC (permalink / raw)
To: maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com,
suzuki.poulose@arm.com, yuzenghui@huawei.com,
catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
LKML
Hello there,
Static analyser cppcheck said:
linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728:48: style: inconclusive: Boolean expression 'common_trap' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean]
Source code is
if (group0_trap || group1_trap || common_trap | dir_trap) {
Maybe better code:
if (group0_trap || group1_trap || common_trap || dir_trap) {
Regards
David Binderman
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728: Possible || and | mixup ?
2025-10-20 11:12 linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728: Possible || and | mixup ? David Binderman
@ 2025-10-20 12:12 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2025-10-20 12:12 UTC (permalink / raw)
To: David Binderman
Cc: oliver.upton@linux.dev, joey.gouly@arm.com,
suzuki.poulose@arm.com, yuzenghui@huawei.com,
catalin.marinas@arm.com, will@kernel.org,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
LKML
On Mon, 20 Oct 2025 12:12:33 +0100,
David Binderman <dcb314@hotmail.com> wrote:
>
> Hello there,
>
> Static analyser cppcheck said:
>
> linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728:48: style: inconclusive: Boolean expression 'common_trap' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean]
>
> Source code is
>
> if (group0_trap || group1_trap || common_trap | dir_trap) {
>
> Maybe better code:
>
> if (group0_trap || group1_trap || common_trap || dir_trap) {
>
Sure. please send in a patch.
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-20 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 11:12 linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728: Possible || and | mixup ? David Binderman
2025-10-20 12:12 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox