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
Unified · Split
| @@ -479,20 +479,14 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) · 478 unmodified lines | |||
| 479 | pinf = &p->ceinfo; | 479 | pinf = &p->ceinfo; |
| 480 | if (!priv->p_data->quirks) { | 480 | if (!priv->p_data->quirks) { |
| 481 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | 481 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, |
| 482 | "DDR ECC error type:%s Row %d Bank %d Col %d ", | 482 | "DDR ECC error type:%s Row %d Bank %d Col %d Bit Position: %d Data: 0x%08x", |
| 483 | "CE", pinf->row, pinf->bank, pinf->col); | 483 | "CE", pinf->row, pinf->bank, pinf->col, |
| 484 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | ||
| 485 | "Bit Position: %d Data: 0x%08x\n", | ||
| 486 | pinf->bitpos, pinf->data); | 484 | pinf->bitpos, pinf->data); |
| 487 | } else { | 485 | } else { |
| 488 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | 486 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, |
| 489 | "DDR ECC error type:%s Row %d Bank %d Col %d ", | 487 | "DDR ECC error type:%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d Bit Position: %d Data: 0x%08x", |
| 490 | "CE", pinf->row, pinf->bank, pinf->col); | 488 | "CE", pinf->row, pinf->bank, pinf->col, |
| 491 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | 489 | pinf->bankgrpnr, pinf->blknr, |
| 492 | "BankGroup Number %d Block Number %d ", | ||
| 493 | pinf->bankgrpnr, pinf->blknr); | ||
| 494 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | ||
| 495 | "Bit Position: %d Data: 0x%08x\n", | ||
| 496 | pinf->bitpos, pinf->data); | 490 | pinf->bitpos, pinf->data); |
| 497 | } | 491 | } |
| 498 | 492 | ||
| @@ -509,10 +503,8 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) · 10 unmodified lines | |||
| 509 | "UE", pinf->row, pinf->bank, pinf->col); | 503 | "UE", pinf->row, pinf->bank, pinf->col); |
| 510 | } else { | 504 | } else { |
| 511 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | 505 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, |
| 512 | "DDR ECC error type :%s Row %d Bank %d Col %d ", | 506 | "DDR ECC error type :%s Row %d Bank %d Col %d BankGroup Number %d Block Number %d", |
| 513 | "UE", pinf->row, pinf->bank, pinf->col); | 507 | "UE", pinf->row, pinf->bank, pinf->col, |
| 514 | snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, | ||
| 515 | "BankGroup Number %d Block Number %d", | ||
| 516 | pinf->bankgrpnr, pinf->blknr); | 508 | pinf->bankgrpnr, pinf->blknr); |
| 517 | } | 509 | } |
| 518 | 510 | ||