lkml.org 
[lkml]   [2019]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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@marvell.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.

\
 
 \ /
  Last update: 2019-08-16 11:24    [W:0.280 / U:39.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site