linux-6.18-rc2/arch/arm64/kvm/vgic/vgic-v3.c:728: Possible || and | mixup ?

Marc Zyngier maz at kernel.org
Mon Oct 20 05:12:42 PDT 2025


On Mon, 20 Oct 2025 12:12:33 +0100,
David Binderman <dcb314 at 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.



More information about the linux-arm-kernel mailing list