Skip to content
Snippets Groups Projects
Commit d2415e2e authored by Qiuxu Zhuo's avatar Qiuxu Zhuo Committed by Tony Luck
Browse files

EDAC/skx_common: Delete duplicated and unreachable code


skx_mce_check_error() returns early if the error isn't from memory.
So when skx_mce_output_error() is invoked from skx_mce_check_error(),
it doesn't need to re-check whether the error is from memory. Delete
the duplicated and unreachable code from skx_mce_output_error().

Signed-off-by: default avatarQiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/all/20230113032802.41752-1-qiuxu.zhuo@intel.com
parent 6e8746cb
No related branches found
No related tags found
No related merge requests found
...@@ -560,44 +560,28 @@ static void skx_mce_output_error(struct mem_ctl_info *mci, ...@@ -560,44 +560,28 @@ static void skx_mce_output_error(struct mem_ctl_info *mci,
tp_event = HW_EVENT_ERR_CORRECTED; tp_event = HW_EVENT_ERR_CORRECTED;
} }
/* switch (optypenum) {
* According to Intel Architecture spec vol 3B, case 0:
* Table 15-10 "IA32_MCi_Status [15:0] Compound Error Code Encoding" optype = "generic undef request error";
* memory errors should fit one of these masks: break;
* 000f 0000 1mmm cccc (binary) case 1:
* 000f 0010 1mmm cccc (binary) [RAM used as cache] optype = "memory read error";
* where: break;
* f = Correction Report Filtering Bit. If 1, subsequent errors case 2:
* won't be shown optype = "memory write error";
* mmm = error type break;
* cccc = channel case 3:
* If the mask doesn't match, report an error to the parsing logic optype = "addr/cmd error";
*/ break;
if (!((errcode & 0xef80) == 0x80 || (errcode & 0xef80) == 0x280)) { case 4:
optype = "Can't parse: it is not a mem"; optype = "memory scrubbing error";
} else { scrub_err = true;
switch (optypenum) { break;
case 0: default:
optype = "generic undef request error"; optype = "reserved";
break; break;
case 1:
optype = "memory read error";
break;
case 2:
optype = "memory write error";
break;
case 3:
optype = "addr/cmd error";
break;
case 4:
optype = "memory scrubbing error";
scrub_err = true;
break;
default:
optype = "reserved";
break;
}
} }
if (res->decoded_by_adxl) { if (res->decoded_by_adxl) {
len = snprintf(skx_msg, MSG_SIZE, "%s%s err_code:0x%04x:0x%04x %s", len = snprintf(skx_msg, MSG_SIZE, "%s%s err_code:0x%04x:0x%04x %s",
overflow ? " OVERFLOW" : "", overflow ? " OVERFLOW" : "",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment