[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190816092449.GK18980@zn.tnic>
Date: Fri, 16 Aug 2019 11:24:49 +0200
From: Borislav Petkov <bp@...en8.de>
To: Robert Richter <rrichter@...vell.com>
Cc: James Morse <james.morse@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 10/24] EDAC, mc: Remove per layer counters
On Mon, Jun 24, 2019 at 03:09:15PM +0000, Robert Richter wrote:
> Looking at how mci->{ue,ce}_per_layer[EDAC_MAX_LAYERS] is used, it
> turns out that only the leaves in the memory hierarchy are consumed
> (in sysfs), but not the intermediate layers, e.g.:
>
> count = dimm->mci->ce_per_layer[dimm->mci->n_layers-1][dimm->idx];
>
> So let's get rid of the unused counters that just add complexity.
>
> Error counter values are directly stored in struct dimm_info now.
>
> Signed-off-by: Robert Richter <rrichter@...vell.com>
> ---
> drivers/edac/edac_mc.c | 98 ++++++++++++------------------------
> drivers/edac/edac_mc_sysfs.c | 20 +++-----
> drivers/edac/ghes_edac.c | 5 +-
> include/linux/edac.h | 7 ++-
> 4 files changed, 44 insertions(+), 86 deletions(-)
>
> diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
> index f2acdab34eb7..bce39b2e10c9 100644
> --- a/drivers/edac/edac_mc.c
> +++ b/drivers/edac/edac_mc.c
> @@ -313,10 +313,9 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
> struct csrow_info *csr;
> struct rank_info *chan;
> struct dimm_info *dimm;
> - u32 *ce_per_layer[EDAC_MAX_LAYERS], *ue_per_layer[EDAC_MAX_LAYERS];
> unsigned pos[EDAC_MAX_LAYERS];
> - unsigned size, tot_dimms = 1, count = 1;
> - unsigned tot_csrows = 1, tot_channels = 1, tot_errcount = 0;
> + unsigned size, tot_dimms = 1;
> + unsigned tot_csrows = 1, tot_channels = 1;
Pls fix those while touching this:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
#48: FILE: drivers/edac/edac_mc.c:317:
+ unsigned size, tot_dimms = 1;
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
#49: FILE: drivers/edac/edac_mc.c:318:
+ unsigned tot_csrows = 1, tot_channels = 1;
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists