EDAC, skx_edac: Fix logical channel intermediate decoding bug
Quoted 22 lines · Tony Luck
From: Qiuxu Zhuo <[email protected]>
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 <[email protected]>Signed-off-by Tony Luck <[email protected]>--- drivers/edac/skx_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/edac/skx_edac.c +0
-0
drivers/edac/skx_edac.c static bool skx_sad_decode(struct decoded_addr *res) · line 674
Quoted 8 lines
drivers/edac/skx_edac.c +1
-1@@ -668,7 +668,7 @@ static bool skx_sad_decode(struct decoded_addr *res)break ;case 2 : lchan = (addr >> shift) %2 ; - lchan = (lchan <<1 ) | ~lchan; + lchan = (lchan <<1 ) | !lchan;break ;case 3 : lchan = ((addr >> shift) %2 ) <<1 ;
Applied, thanks.