Re: [PATCH v2 7/8] cxl/memfeature: Add CXL memory device soft PPR control feature

From: Borislav Petkov
Date: Thu Mar 27 2025 - 13:03:13 EST


On Thu, Mar 20, 2025 at 06:04:44PM +0000, shiju.jose@xxxxxxxxxx wrote:
> diff --git a/drivers/edac/mem_repair.c b/drivers/edac/mem_repair.c
> index 3b1a845457b0..bf7e01a8b4dd 100755
> --- a/drivers/edac/mem_repair.c
> +++ b/drivers/edac/mem_repair.c
> @@ -45,6 +45,11 @@ struct edac_mem_repair_context {
> struct attribute_group group;
> };
>
> +const char * const edac_repair_type[] = {
> + [EDAC_PPR] = "ppr",
> +};
> +EXPORT_SYMBOL_GPL(edac_repair_type);

Why is this thing exported instead of adding a getter function and having all
its users pass in proper defines as arguments?

And "EDAC_PPR" is not a proper define - it doesn't tell me what it is.

It should be more likely a

EDAC_REPAIR_PPR,
EDAC_REPAIR_ROW_SPARING,
EDAC_REPAIR_BANK_SPARING,

and so on.

--
Regards/Gruss,
Boris.

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