Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp691542ybl; Fri, 16 Aug 2019 02:25:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyw0crEBUryXexdFIanm7Or1WNBdHW6WncNxGROpLPOh77qxiNkdR5TR5TyJK2RYARPzZRQ X-Received: by 2002:a17:90a:fc90:: with SMTP id ci16mr6096085pjb.48.1565947512894; Fri, 16 Aug 2019 02:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565947512; cv=none; d=google.com; s=arc-20160816; b=qZhrQejmH9tEyGHYkA26jBcdhtNqVEHcQ1JZYRRTKNnY4/4F4g1rGt7kzG1IfOMEZn cxxtIZyJf76R/lI7fctlet2nGAyg1u3aZyQSe9R6iLe0bmtwlhGNbCKqEFCD055bO7QG Yll8heolocQ3li3Eeu+igmIwvZepwBnoqItQcSa9qCXFNSfNivc7hzkXDIyQUJowE9fI A45nnanJbfM3jmNzNvF5iuaxb/fM+xNQM0NgjgCklkK+2TWd/Ti+KFsZqaVfIciKcEfS CAvXGL9Ddu5DtU3hTt0w7+KJRJrL89E9sjGww3SXd0LHnRTVDToO3dyMXqq/Smxhl0kq YvGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cygAj/2KeoXPUrfXfBK12mcmYpE6aLde83uSyzIMb0w=; b=DQQwTeXAp9bBjmla4kH/GIVA46y1Ysr1qVwjhOLQRGtbJWQkVuvlNpn1/n1kYt7vqe 1C2qJSMf/htT712cl704rnyYqev68WuXVGGztOa/GnYuCb7cM17IIUctDll+ALZl16y/ +uOXwQaqMHtdOPGQvwalnfrwqDXEWRVhKZbroS+E5Kxklxci6OfRyGuBP4Yphe1kI3Gn IRQ2t2r3W/WefrH2USbETobVsXebQZYhU/lYAGgjvMuxWJ7RwNdX8F1NYQy2x7E+ISIN byLeXjMiEmt2kCLMhmwgK7sEZfpbePlAN2NkSWtymqW935Clp3ojfnZVCBftTNEock+O Z2aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DRYCBg1p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si2673445pji.65.2019.08.16.02.24.55; Fri, 16 Aug 2019 02:25:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DRYCBg1p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbfHPJYB (ORCPT + 99 others); Fri, 16 Aug 2019 05:24:01 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49130 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbfHPJYB (ORCPT ); Fri, 16 Aug 2019 05:24:01 -0400 Received: from zn.tnic (p200300EC2F0A920014AE47D987991812.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:9200:14ae:47d9:8799:1812]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A73951EC067D; Fri, 16 Aug 2019 11:23:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1565947439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=cygAj/2KeoXPUrfXfBK12mcmYpE6aLde83uSyzIMb0w=; b=DRYCBg1pOzz4Hg5+hYpeC8vfN1VRSyA41igLJ3kSFnBCEYKX/udaByrO777XrleI6b//ep XLKNWs/PXwQBq/XEDxy4/OGtHeIXJYgCtGJKhfdlu2rEgJWSsd89y/fWxQZGLNBtSVYuMW SiuDPpWaB7BuIlAZdHhYEEeX0aMRRIc= Date: Fri, 16 Aug 2019 11:24:49 +0200 From: Borislav Petkov To: Robert Richter Cc: James Morse , Mauro Carvalho Chehab , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 10/24] EDAC, mc: Remove per layer counters Message-ID: <20190816092449.GK18980@zn.tnic> References: <20190624150758.6695-1-rrichter@marvell.com> <20190624150758.6695-11-rrichter@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190624150758.6695-11-rrichter@marvell.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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.