Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2064198ybz; Thu, 23 Apr 2020 10:57:07 -0700 (PDT) X-Google-Smtp-Source: APiQypKeQVlId5A0Wyz4sceB/SGP/rAULuxlvPLssL+r0U19EOEdGPowu1HxPMii35IaroMogwJ6 X-Received: by 2002:a17:906:f1d7:: with SMTP id gx23mr3621160ejb.176.1587664627600; Thu, 23 Apr 2020 10:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587664627; cv=none; d=google.com; s=arc-20160816; b=XpuMEpQMiQ48h81H3vzyxg8TFb4j3epcsM7aqhJv8krLdxvDiWea5YhhJw6yY7o8et okyEpd/JBsVFEiJ5nQ15PHIkG7qX3gT6CWxK1l2EpkPLCe5kqPUCovk8LyvQYqbGEI6P eQLRQmhh4ge9/wFqjKHAANgaUeRK5TyV4nrgwkfr6uQ6CGNTrjDpXIAP10s5Dmr5dyqk ST811WHxKvVsQVAHEG4Qz9sxhPSfwC5nX/cyLC/M4jPn52pwNZj1yAqR4b1JGpCGCt3f avKI75t85rpLEni0egbl85RsSbJdM/tpHFpO625AaxXvOMKDV7S0/zR7fm0gJdmUbZBn Zl+w== 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=fdCosX/br/wnZBw1bt/2AcGwoWApmog1vU5fGIBemdU=; b=TTB1v1kdZko3sIxXO/I+zdfRWde06x4XnGFlyUvsgHstTt06ZDgBI9AQ8fD4nTsPIW DN+wtajzmKoPiv8iiQQzzxyWVD2h4bod0N704Jn1KQHHE3/sLrjz2b8ShNdkADmVob94 aT2QakRvXYXZY5DgwZ6b0q5dvAhxzRu1lGBs0Lb9PzvvM0GmJJkGKxlWgwVXykv6ns72 EhlTrsvFZbhQ620p1eHGEnjESZxeASR5e6NFqSGpYc3fKQbFlOCqeSeLBIvOyybAQQsw xTDzPWe3MbOOYo+UTWaqTWZbksHyLRvghUDvdjCbm5224a5aUvO3RVHSa/Z/oRzTkvFt +0ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=eFnWmoI2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id x16si1582703eds.487.2020.04.23.10.56.44; Thu, 23 Apr 2020 10:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=eFnWmoI2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730067AbgDWRzR (ORCPT + 99 others); Thu, 23 Apr 2020 13:55:17 -0400 Received: from mail.skyhub.de ([5.9.137.197]:50534 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729995AbgDWRzR (ORCPT ); Thu, 23 Apr 2020 13:55:17 -0400 Received: from zn.tnic (p200300EC2F0D2E00329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:2e00:329c:23ff:fea6:a903]) (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 3C4E51EC0716; Thu, 23 Apr 2020 19:55:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1587664516; 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=fdCosX/br/wnZBw1bt/2AcGwoWApmog1vU5fGIBemdU=; b=eFnWmoI2go161GI7ep3qWvw4Pu+5aW1NYgHeRGRtmk7ZcbRcT3qi5Vx2VY6K/4NcNs9cr2 PFwMXQMVgyKUI4iVh3jPHS5lVKeHywy9/TW0xse2gDrJIbPAOq4hnJ46Maeiqbtltfjeod pSGeVL+c65UxG8RRU7CQ4OeqQiye3YI= Date: Thu, 23 Apr 2020 19:55:17 +0200 From: Borislav Petkov To: Robert Richter Cc: Mauro Carvalho Chehab , Tony Luck , James Morse , Aristeu Rozanski , Matthias Brugger , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/10] EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_mci Message-ID: <20200423175517.GG26021@zn.tnic> References: <20200422115814.22205-1-rrichter@marvell.com> <20200422115814.22205-4-rrichter@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200422115814.22205-4-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 Wed, Apr 22, 2020 at 01:58:07PM +0200, Robert Richter wrote: > The struct members list and ghes of struct ghes_edac_pvt are unused, > remove them. On that occasion, rename it to struct ghes_mci. This is > shorter and aligns better with the current naming scheme. > > Signed-off-by: Robert Richter > --- > drivers/edac/ghes_edac.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c > index cb3dab56a875..39efce0df881 100644 > --- a/drivers/edac/ghes_edac.c > +++ b/drivers/edac/ghes_edac.c > @@ -15,9 +15,7 @@ > #include "edac_module.h" > #include > > -struct ghes_edac_pvt { > - struct list_head list; > - struct ghes *ghes; > +struct ghes_mci { No, that should be "ghes_pvt" because it *is* ghes_edac's private structure and there's also an mci pointer in it. > struct mem_ctl_info *mci; > > /* Buffers for the error handling routine */ > @@ -32,7 +30,7 @@ static refcount_t ghes_refcount = REFCOUNT_INIT(0); > * also provides the necessary (implicit) memory barrier for the SMP > * case to make the pointer visible on another CPU. > */ > -static struct ghes_edac_pvt *ghes_pvt; > +static struct ghes_mci *ghes_pvt; > > /* GHES registration mutex */ > static DEFINE_MUTEX(ghes_reg_mutex); > @@ -203,7 +201,7 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err) > { > struct edac_raw_error_desc *e; > struct mem_ctl_info *mci; > - struct ghes_edac_pvt *pvt; > + struct ghes_mci *pvt; > unsigned long flags; > char *p; > > @@ -457,7 +455,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev) > bool fake = false; > int rc = 0, num_dimm = 0; > struct mem_ctl_info *mci; > - struct ghes_edac_pvt *pvt; > + struct ghes_mci *pvt; > struct edac_mc_layer layers[1]; > struct ghes_edac_dimm_fill dimm_fill; > unsigned long flags; > @@ -494,7 +492,7 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev) > layers[0].size = num_dimm; > layers[0].is_virt_csrow = true; > > - mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(struct ghes_edac_pvt)); > + mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); The sizeof() change doesn't make it better because now I have to go look up what pvt is. sizeof(struct ghes_pvt) tells you what size you're getting here. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette