Commit efe582a1 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'edac_urgent-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fix from Borislav Petkov:
 "Error reporting fix for synopsys_edac: do not overwrite partial
  decoded error message (Sherry Sun)"

* tag 'edac_urgent-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/synopsys: Do not print an error with back-to-back snprintf() calls
parents 378fee2e dfc6014e
...@@ -479,20 +479,14 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) ...@@ -479,20 +479,14 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p)
pinf = &p->ceinfo; pinf = &p->ceinfo;
if (!priv->p_data->quirks) { if (!priv->p_data->quirks) {
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"DDR ECC error type:%s Row %d Bank %d Col %d ", "DDR ECC error type:%s Row %d Bank %d Col %d Bit Position: %d Data: 0x%08x",
"CE", pinf->row, pinf->bank, pinf->col); "CE", pinf->row, pinf->bank, pinf->col,
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"Bit Position: %d Data: 0x%08x\n",
pinf->bitpos, pinf->data); pinf->bitpos, pinf->data);
} else { } else {
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"DDR ECC error type:%s Row %d Bank %d Col %d ", "DDR ECC error type:%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d Bit Position: %d Data: 0x%08x",
"CE", pinf->row, pinf->bank, pinf->col); "CE", pinf->row, pinf->bank, pinf->col,
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, pinf->bankgrpnr, pinf->blknr,
"BankGroup Number %d Block Number %d ",
pinf->bankgrpnr, pinf->blknr);
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"Bit Position: %d Data: 0x%08x\n",
pinf->bitpos, pinf->data); pinf->bitpos, pinf->data);
} }
...@@ -509,10 +503,8 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) ...@@ -509,10 +503,8 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p)
"UE", pinf->row, pinf->bank, pinf->col); "UE", pinf->row, pinf->bank, pinf->col);
} else { } else {
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"DDR ECC error type :%s Row %d Bank %d Col %d ", "DDR ECC error type :%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d",
"UE", pinf->row, pinf->bank, pinf->col); "UE", pinf->row, pinf->bank, pinf->col,
snprintf(priv->message, SYNPS_EDAC_MSG_SIZE,
"BankGroup Number %d Block Number %d",
pinf->bankgrpnr, pinf->blknr); pinf->bankgrpnr, pinf->blknr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment