lkml.org 
[lkml]   [2024]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/2] RAS: Introduce the FRU Memory Poison Manager
On Tue, Feb 13, 2024 at 09:35:16PM -0600, Yazen Ghannam wrote:
> +static void init_fpd(struct cper_fru_poison_desc *fpd, struct mce *m)
> +{
> + memset(fpd, 0, sizeof(struct cper_fru_poison_desc));
> +
> + fpd->timestamp = m->time;
> + fpd->hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
> + fpd->hw_id = m->ipid;
> + fpd->addr_type = FPD_ADDR_TYPE_MCA_ADDR;
> + fpd->addr = m->addr;
> +}

Get rid of that one:

diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index f8799beddcc4..090b60d269e7 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -221,17 +221,6 @@ static int update_record_on_storage(struct fru_rec *rec)
return ret;
}

-static void init_fpd(struct cper_fru_poison_desc *fpd, struct mce *m)
-{
- memset(fpd, 0, sizeof(struct cper_fru_poison_desc));
-
- fpd->timestamp = m->time;
- fpd->hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
- fpd->hw_id = m->ipid;
- fpd->addr_type = FPD_ADDR_TYPE_MCA_ADDR;
- fpd->addr = m->addr;
-}
-
static bool has_valid_entries(struct fru_rec *rec)
{
if (!(rec->fmp.validation_bits & FMP_VALID_LIST_ENTRIES))
@@ -288,7 +277,13 @@ static void update_fru_record(struct fru_rec *rec, struct mce *m)

mutex_lock(&fmpm_update_mutex);

- init_fpd(&fpd, m);
+ memset(&fpd, 0, sizeof(struct cper_fru_poison_desc));
+
+ fpd.timestamp = m->time;
+ fpd.hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
+ fpd.hw_id = m->ipid;
+ fpd.addr_type = FPD_ADDR_TYPE_MCA_ADDR;
+ fpd.addr = m->addr;

/* This is the first entry, so just save it. */
if (!has_valid_entries(rec))
--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2024-05-27 15:02    [W:0.575 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site