Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1333144ybb; Fri, 29 Mar 2019 02:20:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDrSvgtY09XTcJ0nfj3Ody/QzXGABS7F0erbQ0T6/qxInwDQ7JNeQbFNZz/P/d4FcGbru/ X-Received: by 2002:a17:902:70cc:: with SMTP id l12mr29509308plt.10.1553851232515; Fri, 29 Mar 2019 02:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553851232; cv=none; d=google.com; s=arc-20160816; b=v4trUNMENWcPHpeoVtW8V1WjbhfFnvRZzKxTCpd3AKm4wCOF37hfHta3vLxit0HjXd fiqsEVJpIfZR6SVrCtY83hAIgy9erILsfi2oReH6PXDjfTwCx6xNm2uZR/xCBfY5mHiD awA53Tg7FzkTv0eXj74yVyKGWpg84ItwlGLTgM8PsCav1FN1s1bp9ZwNi+4Hc5brd7av jDnZ9dcToF5qKG4X6QxZnZCbAki0ZKTzDEntOhjJbc/yslemSafXqrBLJI0r2VWMsOmg Rqx4gKpYgbQREF/6acTKWiOfirvcso8eJNBsqlZj47Zfr8rk8r1AkOPJvTPh2ynbXiXB heIw== 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; bh=eQYryy6sb2c50zaATDbp2MBpcQ5pGs0XoycQMFxst60=; b=mRos89xGQvhV/INqvxfsFNCe6zrtjGI4H/ph9qiJDJ9PmBxhYtG3nKc/nHBgw2hsMG W+CjU0PRWq1Il7wwmosmdSNcC6ddsmY/BtYaMDqA4mOiIJnHxZXLlfLko01eKmnPL1zd L+JGRcBWHiHoM/138Z8Vip7zVZtVi4mB7IPWd4wocd8uVB90MlW/saArmjgYVUTQSWsW gqK+fkyCcYykSX75bU+Z7WXz3s2eUgj3kvuyrSWHDpdhcGuSCwKJtgziOrJVBp2hEksH po084Peokbvv5xjzErRj9W4NcMa+9odBLwmThj5L+gmI+gZc+4KSfkHpONYTgLZTSOqY EhIw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si1461357plb.395.2019.03.29.02.20.16; Fri, 29 Mar 2019 02:20:32 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728826AbfC2JTj (ORCPT + 99 others); Fri, 29 Mar 2019 05:19:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42436 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728676AbfC2JTi (ORCPT ); Fri, 29 Mar 2019 05:19:38 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7FABD307CDED; Fri, 29 Mar 2019 09:19:38 +0000 (UTC) Received: from localhost (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC4521EE; Fri, 29 Mar 2019 09:19:37 +0000 (UTC) Date: Fri, 29 Mar 2019 17:19:35 +0800 From: Baoquan He To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, rafael@kernel.org, akpm@linux-foundation.org, osalvador@suse.de, rppt@linux.ibm.com, willy@infradead.org, fanc.fnst@cn.fujitsu.com Subject: Re: [PATCH v3 2/2] drivers/base/memory.c: Rename the misleading parameter Message-ID: <20190329091935.GF7627@MiWiFi-R3L-srv> References: <20190329082915.19763-1-bhe@redhat.com> <20190329082915.19763-2-bhe@redhat.com> <20190329091325.GD28616@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190329091325.GD28616@dhcp22.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 29 Mar 2019 09:19:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/29/19 at 10:13am, Michal Hocko wrote: > On Fri 29-03-19 16:29:15, Baoquan He wrote: > > The input parameter 'phys_index' of memory_block_action() is actually > > the section number, but not the phys_index of memory_block. Fix it. > > I have tried to explain that the naming is mostly a relict from the past > than really a misleading name http://lkml.kernel.org/r/20190326093315.GL28406@dhcp22.suse.cz > Maybe it would be good to reflect that in the changelog > > > Signed-off-by: Baoquan He > > btw. I've acked the previous version as well. Sure, will rewrite the log and add people's Acked-by tag. Thanks. > > > --- > > v2->v3: > > Rename the parameter to 'start_section_nr' from 'sec'. > > > > drivers/base/memory.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/base/memory.c b/drivers/base/memory.c > > index cb8347500ce2..9ea972b2ae79 100644 > > --- a/drivers/base/memory.c > > +++ b/drivers/base/memory.c > > @@ -231,13 +231,14 @@ static bool pages_correctly_probed(unsigned long start_pfn) > > * OK to have direct references to sparsemem variables in here. > > */ > > static int > > -memory_block_action(unsigned long phys_index, unsigned long action, int online_type) > > +memory_block_action(unsigned long start_section_nr, unsigned long action, > > + int online_type) > > { > > unsigned long start_pfn; > > unsigned long nr_pages = PAGES_PER_SECTION * sections_per_block; > > int ret; > > > > - start_pfn = section_nr_to_pfn(phys_index); > > + start_pfn = section_nr_to_pfn(start_section_nr); > > > > switch (action) { > > case MEM_ONLINE: > > @@ -251,7 +252,7 @@ memory_block_action(unsigned long phys_index, unsigned long action, int online_t > > break; > > default: > > WARN(1, KERN_WARNING "%s(%ld, %ld) unknown action: " > > - "%ld\n", __func__, phys_index, action, action); > > + "%ld\n", __func__, start_section_nr, action, action); > > ret = -EINVAL; > > } > > > > -- > > 2.17.2 > > > > -- > Michal Hocko > SUSE Labs