Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3708408ybx; Sat, 9 Nov 2019 02:24:30 -0800 (PST) X-Google-Smtp-Source: APXvYqyW+YPxgxHsUPrZO5KDTvoeHXe6G/wHIaGJRnYp5Knfow2Ohg44r8J90aHGbK+NHuzNG44D X-Received: by 2002:a17:906:1542:: with SMTP id c2mr12987731ejd.80.1573295070725; Sat, 09 Nov 2019 02:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573295070; cv=none; d=google.com; s=arc-20160816; b=brrgvKDn5yHwlp7TSN8Kx8jropsgYsUZEGndZ3qSbMXO3H+hDOJpKMaq3hDJ/i2zUE WpfKezWQBsyeKuoexORi+93vlkWnO8FiB2vsqSfthrlPrZ/D/KyLZ6V/1oIbocXgyVHr TbOQR/+BNtlCTXSZwJozkV5QkZwaUOxu4J351Ggf8JlfD4WaguwwqxubrxFhd7GlouQH jZ4ViXxTfKhBL6ccgGAXjhwmZKkqcmsgsv0+BOogBjde8ogx5FgOf1QJA0EfqTHrCo5M Bjrc7kJ9URY0jEpBtkChQ6/JjBJPmZ1moVxO2E4fB2DeqSZn/Qb1MZRJwDsJBxd/uwIB yjVg== 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=MyC6e9vomysMP7lwrjTJBZVkQlL0RL+jwPk7ArLmGqo=; b=Qe/QlgTVnmNfTAq1BxJu4YmnnejmfM6SLfbrQXdlLYqZ9e54UFH+HuYM1Upk4YCMLm KrkYwYMR3rARX2IqDElCUbcTcdtxfaISc3pJpckctgfJ/A3/ski0bc7ZFHMK0H13avvz 5VYO5XAmwabHsuJHnK7e4rMRbfo5YCIIKLlx0zrcF8/umqzgC33uczRByz4I8+D7TlYD 4dxOWlaIxtEOG8/GDu2s+XqdOyHRVVJ3T2RuWzB5kQS8Eh2WuIJRBMFofhK4OM85QHPt 1kV98qrEMGNjWmzxCPgimmx5/3PSzG3Mve6E7ZG0AYMJsFt9SM6wzxTAkQIExCTEZuyk oQ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="S/ZuoxHq"; 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 m12si1290154ejr.306.2019.11.09.02.24.08; Sat, 09 Nov 2019 02:24:30 -0800 (PST) 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="S/ZuoxHq"; 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 S1726320AbfKIKVc (ORCPT + 99 others); Sat, 9 Nov 2019 05:21:32 -0500 Received: from mail.skyhub.de ([5.9.137.197]:46810 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbfKIKVc (ORCPT ); Sat, 9 Nov 2019 05:21:32 -0500 Received: from zn.tnic (p200300EC2F1EA70018ABFAC8D0403DA5.dip0.t-ipconnect.de [IPv6:2003:ec:2f1e:a700:18ab:fac8:d040:3da5]) (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 9CF101EC0D0F; Sat, 9 Nov 2019 11:21:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1573294886; 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=MyC6e9vomysMP7lwrjTJBZVkQlL0RL+jwPk7ArLmGqo=; b=S/ZuoxHqssosqiAVZspsuqbnYPsyDb8FAdpJFKG0gOf3cehu/b631AvidW6VeFtGO7fDgn 9/KmYMRmKZJtACGLvC+ephPtd29rCJXthG+HcyaLPjRLxg69tPwizfWflHklJ5NtWDE+YU 9DcT3QcJTZjUeNwZ8nuZqz4FAqCy7to= Date: Sat, 9 Nov 2019 11:21:27 +0100 From: Borislav Petkov To: Robert Richter Cc: Mauro Carvalho Chehab , Tony Luck , James Morse , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mauro Carvalho Chehab Subject: Re: [PATCH v2 07/20] EDAC, mc: Rename iterator variable to idx Message-ID: <20191109102127.GC2699@zn.tnic> References: <20191106093239.25517-1-rrichter@marvell.com> <20191106093239.25517-8-rrichter@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191106093239.25517-8-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, Nov 06, 2019 at 09:33:16AM +0000, Robert Richter wrote: > Rename iterator variable to idx. The name is more handy, esp. when > searching it in the code. > > Signed-off-by: Robert Richter > Reviewed-by: Mauro Carvalho Chehab > --- > drivers/edac/edac_mc.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c > index 3dc1c5afabce..f76252b7a787 100644 > --- a/drivers/edac/edac_mc.c > +++ b/drivers/edac/edac_mc.c > @@ -330,14 +330,14 @@ struct mem_ctl_info *edac_mc_alloc(unsigned int mc_num, > * Calculate the total amount of dimms and csrows/cschannels while > * in the old API emulation mode > */ > - for (i = 0; i < n_layers; i++) { > - tot_dimms *= layers[i].size; > - if (layers[i].is_virt_csrow) > - tot_csrows *= layers[i].size; > + for (idx = 0; idx < n_layers; idx++) { > + tot_dimms *= layers[idx].size; > + if (layers[idx].is_virt_csrow) > + tot_csrows *= layers[idx].size; > else > - tot_channels *= layers[i].size; > + tot_channels *= layers[idx].size; > > - if (layers[i].type == EDAC_MC_LAYER_CHIP_SELECT) > + if (layers[idx].type == EDAC_MC_LAYER_CHIP_SELECT) > per_rank = true; > } > > -- Merging that one with 2/20 where you already are converting to "idx" in the same function. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette