EDAC/synopsys: Clear the ECC counters on init
authorShubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Sun, 13 Jul 2025 05:07:53 +0000 (10:37 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 14 Jul 2025 10:15:37 +0000 (12:15 +0200)
commitb1dc7f097b78eb8d25b071ead2384b07a549692b
tree3c13895e03d624dc7f9b2503f9e2abb7b26aaf49
parent05a61c6cb631a13465f9d3cc875b65a21d40568a
EDAC/synopsys: Clear the ECC counters on init

Clear the ECC error and counter registers during initialization/probe to avoid
reporting stale errors that may have occurred before EDAC registration.

For that, unify the Zynq and ZynqMP ECC state reading paths and simplify the
code.

  [ bp: Massage commit message.
    Fix an -Wsometimes-uninitialized warning as reported by
Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202507141048.obUv3ZUm-lkp@intel.com ]

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250713050753.7042-1-shubhrajyoti.datta@amd.com
drivers/edac/synopsys_edac.c