aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/cper.c
diff options
context:
space:
mode:
authorShuai Xue <xueshuai@linux.alibaba.com>2022-03-08 22:40:52 +0800
committerBorislav Petkov <bp@suse.de>2022-04-08 11:31:18 +0200
commited27b5df3877458eb24615fd9c202178660db009 (patch)
treedfdae7d45985dd794f507cf39ba2dd0f65103c32 /drivers/firmware/efi/cper.c
parentefi/cper: Add a cper_mem_err_status_str() to decode error description (diff)
downloadlinux-dev-ed27b5df3877458eb24615fd9c202178660db009.tar.xz
linux-dev-ed27b5df3877458eb24615fd9c202178660db009.zip
EDAC/ghes: Unify CPER memory error location reporting
Switch the GHES EDAC memory error reporting functions to use the common CPER ones and get rid of code duplication. [ bp: - rewrite commit message, remove useless text - rip out useless reformatting - align function params on the opening brace - rename function to a more descriptive name - drop useless function exports - handle buffer lengths properly when printing other detail - remove useless casting ] Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220308144053.49090-3-xueshuai@linux.alibaba.com
Diffstat (limited to 'drivers/firmware/efi/cper.c')
-rw-r--r--drivers/firmware/efi/cper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/efi/cper.c b/drivers/firmware/efi/cper.c
index 34eeaa59f04a..215c778fb33c 100644
--- a/drivers/firmware/efi/cper.c
+++ b/drivers/firmware/efi/cper.c
@@ -237,7 +237,7 @@ const char *cper_mem_err_status_str(u64 status)
}
EXPORT_SYMBOL_GPL(cper_mem_err_status_str);
-static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)
+int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)
{
u32 len, n;
@@ -291,7 +291,7 @@ static int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg)
return n;
}
-static int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)
+int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)
{
u32 len, n;
const char *bank = NULL, *device = NULL;