RE: [PATCH] EDAC/skx_base: Fix ambiguous bitwise and logical operator style
From: Bryan Chan
Date: Tue Sep 22 2026 - 23:49:38 EST
On 2026-09-23 00:20 +0000, Luck, Tony wrote:
Hi Tony,
> > The code works fine and works how it should be, the fix is just for
> > uniformity/consistency of the bitwise operations. Also fix the compiler
> > warning.
>
> Details? I don't see a warning with gcc 14.3.1
>
> Which compiler, version, and any relevant compiler flags.
>
> What is the warning message?
>
> -Tony
>
Sorry for my mistake, this is not compiler warning, but warning from the
sparse, here is the warning message:
drivers/edac/skx_base.c:359:46: warning: dubious: x | !y
The command and flag used:
make C=1 W=1 drivers/edac/skx_base.o
The change is a style fix rather than gcc warning fix. After change, the
whole operation will be bitwise shift and xor, instead of bitwise shift
and logical (not), which increase readability and consistancy.
My gcc version is 16.2.1 20260810