Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3701559ybi; Tue, 18 Jun 2019 05:17:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYRHENh3WieKyegsjbPucw3KQVaVVOG0wLMr/3nn/ZqN/GLRn4rzhEKOv3jNegVCmGKNyA X-Received: by 2002:aa7:8083:: with SMTP id v3mr41868811pff.69.1560860273278; Tue, 18 Jun 2019 05:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560860273; cv=none; d=google.com; s=arc-20160816; b=L8IWH05iJm4ZgpfL3FWlNE/9fA6oMMC6H71DMi8/PzHVd8icZuvwRWBQZK+ty0xwuc F0PdZfpn9up5kSKhWqq5+H1RyAqjD+skGUTk4iZHAvZD/uq29NHwPTPK9aZGVOlrs2/l Ud7rhpH3tcOgOs0bhBCTCNPLbBhUGVEDqfnCrQ8FkvuCAuCILgmJBFtvsVEdUD2dT4N9 9ga8xSETWcdeVW7+nF7Ph5Id4+IBi68JAbdSzLdo9npGOKl/+4p9FCNet1PqCOgDhDpn 5J367yqhpNFxbxNgSZHjnJoRmGzLxnbaOXUWsLqyltGk6NlMnb44Dp7+7QvDtYSowP3s SCFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from; bh=T7+CO9gEZBjR3KtxNJYyh2R+C4zxV8piP33mQylFO6I=; b=B0JY10aWR3SfGS9LOHql5fwJUMWMbR2cffz/MRBkFIjiI88Nbzi2KY7GBPZqSLgaei j8fGftsQfiEWumfn95sh6FU9KJtl4DiFKPVZEfcTCcf6hHuzQcZEo7+0tA3QfvMFeuXY qs64lu4MjQxxtIKkogqRwfhUufYuR/I5W/Le0z3VZQD//9r3L9Q9gX7ZEwK8INSS/7Iw Bb+HcJO0BcMBlLXbTdNQ6eveqHL/iPD7R8niuP/JG1v3DYLo/cBgRnZUqb8/+ZqUwhCL vfpzct+TC1hhdJgWx/JSiQ1sCvjlIXk3WAXSzdNnEk9uyO46fYSrNKjnLIFQJUuQaA8a okIw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si12873603plh.398.2019.06.18.05.17.37; Tue, 18 Jun 2019 05:17:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbfFRMRZ convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Jun 2019 08:17:25 -0400 Received: from ozlabs.org ([203.11.71.1]:56151 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbfFRMRZ (ORCPT ); Tue, 18 Jun 2019 08:17:25 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45SnC6001Qz9s3l; Tue, 18 Jun 2019 22:17:21 +1000 (AEST) From: Michael Ellerman To: Andrew Morton , Christophe Leroy Cc: Stephen Rothwell , Michal Hocko , Pavel Tatashin , linux-acpi@vger.kernel.org, Baoquan He , David Hildenbrand , Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Wei Yang , linux-mm@kvack.org, Mike Rapoport , Arun KS , Johannes Weiner , Dan Williams , linuxppc-dev@lists.ozlabs.org, Mel Gorman , Vlastimil Babka , Oscar Salvador Subject: Re: [PATCH v1 1/6] mm: Section numbers use the type "unsigned long" In-Reply-To: <20190617185757.b57402b465caff0cf6f85320@linux-foundation.org> References: <20190614100114.311-1-david@redhat.com> <20190614100114.311-2-david@redhat.com> <20190614120036.00ae392e3f210e7bc9ec6960@linux-foundation.org> <701e8feb-cbf8-04c1-758c-046da9394ac1@c-s.fr> <20190617185757.b57402b465caff0cf6f85320@linux-foundation.org> Date: Tue, 18 Jun 2019 22:17:19 +1000 Message-ID: <87pnnbozow.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton writes: > On Sat, 15 Jun 2019 10:06:54 +0200 Christophe Leroy wrote: >> Le 14/06/2019 à 21:00, Andrew Morton a écrit : >> > On Fri, 14 Jun 2019 12:01:09 +0200 David Hildenbrand wrote: >> > >> >> We are using a mixture of "int" and "unsigned long". Let's make this >> >> consistent by using "unsigned long" everywhere. We'll do the same with >> >> memory block ids next. >> >> >> >> ... >> >> >> >> - int i, ret, section_count = 0; >> >> + unsigned long i; >> >> >> >> ... >> >> >> >> - unsigned int i; >> >> + unsigned long i; >> > >> > Maybe I did too much fortran back in the day, but I think the >> > expectation is that a variable called "i" has type "int". ... >> Codying style says the following, which makes full sense in my opinion: >> >> LOCAL variable names should be short, and to the point. If you have >> some random integer loop counter, it should probably be called ``i``. >> Calling it ``loop_counter`` is non-productive, if there is no chance of it >> being mis-understood. > > Well. It did say "integer". Calling an unsigned long `i' is flat out > misleading. I always thought `i` was for loop `index` not `integer`. But I've never written any Fortran :) cheers