Commit dfc6014
EDAC/synopsys: Do not print an error with back-to-back snprintf() calls
handle_error() currently calls snprintf() a couple of times in
succession to output the message for a CE/UE, therefore overwriting each
part of the message which was formatted with the previous snprintf()
call. As a result, only the part of the message from the last snprintf()
call will be printed.
The simplest and most effective way to fix this problem is to combine
the whole string into one which to supply to a single snprintf() call.
[ bp: Massage. ]
Fixes: b500b4a ("EDAC, synopsys: Add ECC support for ZynqMP DDR controller")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: James Morse <james.morse@arm.com>
Cc: Manish Narani <manish.narani@xilinx.com>
Link: https://lkml.kernel.org/r/1582792452-32575-1-git-send-email-sherry.sun@nxp.com1 parent f8788d8 commit dfc6014
1 file changed
Lines changed: 7 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 482 | + | |
| 483 | + | |
486 | 484 | | |
487 | 485 | | |
488 | 486 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
496 | 490 | | |
497 | 491 | | |
498 | 492 | | |
| |||
509 | 503 | | |
510 | 504 | | |
511 | 505 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 506 | + | |
| 507 | + | |
516 | 508 | | |
517 | 509 | | |
518 | 510 | | |
| |||
0 commit comments