diff mbox series

EDAC: Init minimum possible error desc grain

Message ID 20220420200708.29921-1-vgomonovych@marvell.com (mailing list archive)
State New, archived
Headers show
Series EDAC: Init minimum possible error desc grain | expand

Commit Message

Vasyl Gomonovych April 20, 2022, 8:07 p.m. UTC
Initialize the raw error descriptor after
zeroing to a minimum possible value 1.
It is safe for DIMM and not DIMM-based
systems and does not provide a useless
verification print.

Signed-off-by: Vasyl Gomonovych <vgomonovych@marvell.com>
---
 drivers/edac/edac_mc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index d2715774af6fb3a0b07ff2c6ce6bb510091c0a68..a985f9a0b89b466934d1c167bdb243687fbfd093 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -990,10 +990,6 @@  void edac_raw_mc_handle_error(struct edac_raw_error_desc *e)
 	struct mem_ctl_info *mci = error_desc_to_mci(e);
 	u8 grain_bits;
 
-	/* Sanity-check driver-supplied grain value. */
-	if (WARN_ON_ONCE(!e->grain))
-		e->grain = 1;
-
 	grain_bits = fls_long(e->grain - 1);
 
 	/* Report the error via the trace interface */
@@ -1047,6 +1043,7 @@  void edac_mc_handle_error(const enum hw_event_mc_err_type type,
 	/* need valid strings here for both: */
 	e->msg = msg ?: "";
 	e->other_detail = other_detail ?: "";
+	e->grain = 1;
 
 	/*
 	 * Check if the event report is consistent and if the memory location is