[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240214111032.GGZcyfqFqsW0j4Yy3a@fat_crate.local>
Date: Wed, 14 Feb 2024 12:10:32 +0100
From: Borislav Petkov <bp@...en8.de>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: tony.luck@...el.com, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org, avadhut.naik@....com,
john.allen@....com, muralidhara.mk@....com,
naveenkrishna.chatradhi@....com, sathyapriya.k@....com
Subject: Re: [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
Powered by blists - more mailing lists