Re: [PATCH 2/2] RAS: Introduce the FRU Memory Poison Manager

From: Borislav Petkov
Date: Wed Feb 14 2024 - 13:47:27 EST


On Tue, Feb 13, 2024 at 09:35:16PM -0600, Yazen Ghannam wrote:
> +static bool same_fpd(struct cper_fru_poison_desc *old, struct cper_fru_poison_desc *new)

The usual convention in the kernel is:

diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index 643c36b6dc9c..e50f11fb90a4 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -220,7 +220,7 @@ static bool rec_has_valid_entries(struct fru_rec *rec)
return true;
}

-static bool same_fpd(struct cper_fru_poison_desc *old, struct cper_fru_poison_desc *new)
+static bool fpds_equal(struct cper_fru_poison_desc *old, struct cper_fru_poison_desc *new)
{
/*
* Ignore timestamp field.
@@ -250,7 +250,7 @@ static bool rec_has_fpd(struct fru_rec *rec, struct cper_fru_poison_desc *fpd)
for (i = 0; i < rec->fmp.nr_entries; i++) {
struct cper_fru_poison_desc *fpd_i = &rec->entries[i];

- if (same_fpd(fpd_i, fpd)) {
+ if (fpds_equal(fpd_i, fpd)) {
pr_debug("Found duplicate record");
return true;
}


--
Regards/Gruss,
Boris.

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