Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751731AbdF0FZq (ORCPT ); Tue, 27 Jun 2017 01:25:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:58987 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751501AbdF0FZi (ORCPT ); Tue, 27 Jun 2017 01:25:38 -0400 Date: Tue, 27 Jun 2017 07:25:35 +0200 From: Michal Hocko To: Anshuman Khandual Cc: Wei Yang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memory_hotplug: remove an unused variable in move_pfn_range_to_zone() Message-ID: <20170627052535.GB28072@dhcp22.suse.cz> References: <20170626231928.54565-1-richard.weiyang@gmail.com> <6a58b706-f409-b81f-4859-a6323bce1758@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a58b706-f409-b81f-4859-a6323bce1758@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1248 Lines: 42 On Tue 27-06-17 10:26:38, Anshuman Khandual wrote: > On 06/27/2017 04:49 AM, Wei Yang wrote: > > There is an unused variable in move_pfn_range_to_zone(). > > > > This patch just removes it. > > > > Signed-off-by: Wei Yang > > --- > > mm/memory_hotplug.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > > index 514014dde16b..16167c92bbf1 100644 > > --- a/mm/memory_hotplug.c > > +++ b/mm/memory_hotplug.c > > @@ -899,7 +899,6 @@ void __ref move_pfn_range_to_zone(struct zone *zone, > > struct pglist_data *pgdat = zone->zone_pgdat; > > int nid = pgdat->node_id; > > unsigned long flags; > > - unsigned long i; > > > > if (zone_is_empty(zone)) > > init_currently_empty_zone(zone, start_pfn, nr_pages); > > We have this down in the function. IIRC I had checked out tag > mmotm-2017-06-16-13-59 where I am looking out for this function. It's a follow up for mm-memory_hotplug-do-not-associate-hotadded-memory-to-zones-until-online-fix-2.patch in mmotm-2017-06-23-15-03 > > for (i = 0; i < nr_pages; i++) { > unsigned long pfn = start_pfn + i; > set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn); > } > > -- Michal Hocko SUSE Labs