Re: [PATCH 10/14] EDAC/amd64: Add setup_mci_misc_sttrs() into pvt->ops

Yazen Ghannam
2022-03-28T16:39:52Z

On Mon, Feb 28, 2022 at 09:43:50PM +0530, Naveen Krishna Chatradhi wrote:
> From: Muralidhara M K <muralimk@amd.com>
>
> Add function pointer for setup_mci_misc_sttrs() in pvt->ops and assign
> family specific setup_mci_misc_sttrs() definitions appropriately
>

Please include the "why".

> Signed-off-by: Muralidhara M K <muralimk@amd.com>
> Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
> ---
> This patch is created by splitting the 5/12th patch in series
> [v7 5/12] https://patchwork.kernel.org/project/linux-edac/patch/20220203174942.31630-6-nchatrad@amd.com/
>
> drivers/edac/amd64_edac.c | 13 ++++++++++---
> drivers/edac/amd64_edac.h | 1 +
> 2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
> index e3b0a0329f43..c86674c3238d 100644
> --- a/drivers/edac/amd64_edac.c
> +++ b/drivers/edac/amd64_edac.c
> @@ -3756,7 +3756,7 @@ f17_determine_edac_ctl_cap(struct mem_ctl_info *mci, struct amd64_pvt *pvt)
> }
> }
>
> -static void setup_mci_misc_attrs(struct mem_ctl_info *mci)
> +static void f1x_setup_mci_misc_attrs(struct mem_ctl_info *mci)

The MEM_FLAG values aren't correct in this function. I'd like to say we can
just not set mtype_cap since it's only used in a single debug print statement.
But that's in edac_mc, so maybe some users expect it?

Thanks,
Yazen