Skip to content

Commit 8f18973

Browse files
qzhuo2suryasaimadhu
authored andcommitted
EDAC, skx_edac: Fix logical channel intermediate decoding
The code "lchan = (lchan << 1) | ~lchan" for logical channel intermediate decoding is wrong. The wrong intermediate decoding result is {0xffffffff, 0xfffffffe}. Fix it by replacing '~' with '!'. The correct intermediate decoding result is {0x1, 0x2}. Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> CC: Aristeu Rozanski <aris@redhat.com> CC: Mauro Carvalho Chehab <mchehab@kernel.org> CC: linux-edac <linux-edac@vger.kernel.org> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20181009172025.18594-1-tony.luck@intel.com
1 parent 432de7f commit 8f18973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/edac/skx_edac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ static bool skx_sad_decode(struct decoded_addr *res)
668668
break;
669669
case 2:
670670
lchan = (addr >> shift) % 2;
671-
lchan = (lchan << 1) | ~lchan;
671+
lchan = (lchan << 1) | !lchan;
672672
break;
673673
case 3:
674674
lchan = ((addr >> shift) % 2) << 1;

0 commit comments

Comments
 (0)