Re: [PATCH v3] EDAC/ghes: Setup DIMM label from DMI and use it in error reports

From: Borislav Petkov
Date: Tue May 19 2020 - 17:30:59 EST


On Tue, May 19, 2020 at 10:25:35PM +0200, Borislav Petkov wrote:
> but I'm guessing that dmi_memdev_name() doesn't give on my machine what
> it gives on yours.

IOW, this ontop:

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index c7d404629863..f84c117c4310 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -109,9 +109,9 @@ static void dimm_setup_label(struct dimm_info *dimm, u16 handle)
if (bank && *bank && device && *device)
snprintf(dimm->label, sizeof(dimm->label),
"%s %s", bank, device);
- else
- snprintf(dimm->label, sizeof(dimm->label),
- "unknown memory (handle: 0x%.4x)", handle);
+ /*
+ * else fallback to the EDAC default name.
+ */
}

static void ghes_edac_dmidecode(const struct dmi_header *dh, void *arg)

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette