Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1300119ybb; Fri, 29 Mar 2019 01:32:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgl04el9+6tE25wf7BpmgC6rZ21ZLXVZL2RDzU4LfP1SiE9wR/kSFCLUwQ6RE0DXNGbF8V X-Received: by 2002:a65:4bce:: with SMTP id p14mr45143919pgr.68.1553848334059; Fri, 29 Mar 2019 01:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553848334; cv=none; d=google.com; s=arc-20160816; b=PAjNxR0ufKB8Y8sB8WSUm8kL75yLr3WYaq1+IdtRLt13JtMY92EfVVDm6WctLZtZ0T XaS1Xh6ztU5IM/HdW3VMcnoz1yPyO4J4FQMPsuA51zrvTX3udvcJ68BrE5EPvX8v16ug tinW9gCxFIpQDmSk57htvSgMeTHFswlsqjiOo8/m+pFHmqvw/9nxBUJTbRH/rvPxJdvH 2UChF8NzL+Pv/F55v0sI9qMm0RoRVuq4YTjol3otwkMeMTgb8rHGwbEE3nKiXiyVIiie 38rOcK8u4Tugenx8hPVUemo5+4j7iDo92m/5KiFTatisi1PfCkhb/vlkIapp/eEpVYHP CA+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=5twMoMjMOvf9bw1OR0G5ZaTFhu7W5fUrKujt+S6RwVQ=; b=vc3bnBeg2jzqbuVGNUzqHhfVqPHua2MXM6GNVtUgwYb72kv4RZN1vMJtjZPATIRFUe uTBoNwxJjR198MFfxBjzKsQMVhDfyzEEZBeQ1hahDSEbxpO6pGd9ut7YqHahSaVaPPbX q0cfTw+I6f2ks2fz6Be+kpKeTejY2in3XyfwD78DC9U54HrkTFtbsuR+dMorULi2AaN9 1JDER7I8BmA5wgfSbumN8u0bM2KnWBNr3XxIQ4BR+XoD6astjUfLWAQbTN931069XWHf IedCY6HCFxsiwYCNUUIJALQ1n8MhByph3zMIlHxPEpdwmtdObiypofMQDSFbgpep6RYJ kYQQ== 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 bg8si1361633plb.109.2019.03.29.01.31.58; Fri, 29 Mar 2019 01:32:14 -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 S1729155AbfC2I30 (ORCPT + 99 others); Fri, 29 Mar 2019 04:29:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52800 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728398AbfC2I3Z (ORCPT ); Fri, 29 Mar 2019 04:29:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8FEF1E319; Fri, 29 Mar 2019 08:29:25 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-24.pek2.redhat.com [10.72.12.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE0935D961; Fri, 29 Mar 2019 08:29:21 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, rafael@kernel.org, akpm@linux-foundation.org, mhocko@suse.com, osalvador@suse.de, rppt@linux.ibm.com, willy@infradead.org, fanc.fnst@cn.fujitsu.com, Baoquan He Subject: [PATCH v3 2/2] drivers/base/memory.c: Rename the misleading parameter Date: Fri, 29 Mar 2019 16:29:15 +0800 Message-Id: <20190329082915.19763-2-bhe@redhat.com> In-Reply-To: <20190329082915.19763-1-bhe@redhat.com> References: <20190329082915.19763-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 29 Mar 2019 08:29:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The input parameter 'phys_index' of memory_block_action() is actually the section number, but not the phys_index of memory_block. Fix it. Signed-off-by: Baoquan He --- 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