[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220420200708.29921-1-vgomonovych@marvell.com>
Date: Wed, 20 Apr 2022 13:07:08 -0700
From: Vasyl Gomonovych <vgomonovych@...vell.com>
To: <bp@...en8.de>, <mchehab@...nel.org>, <tony.luck@...el.com>,
<james.morse@....com>, <rric@...nel.org>,
<vgomonovych@...vell.com>, <linux-edac@...r.kernel.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH] EDAC: Init minimum possible error desc grain
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@...vell.com>
---
drivers/edac/edac_mc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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
--
2.17.1
Powered by blists - more mailing lists