Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754702AbdDDQCv (ORCPT ); Tue, 4 Apr 2017 12:02:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42387 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754349AbdDDQCt (ORCPT ); Tue, 4 Apr 2017 12:02:49 -0400 Date: Tue, 4 Apr 2017 11:02:39 -0500 From: Reza Arbab To: Michal Hocko Cc: Mel Gorman , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Andrea Arcangeli , Yasuaki Ishimatsu , Tang Chen , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , Zhang Zhen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML , Chris Metcalf , Dan Williams , Heiko Carstens , Lai Jiangshan , Martin Schwidefsky Subject: Re: [PATCH 0/6] mm: make movable onlining suck less References: <20170330115454.32154-1-mhocko@kernel.org> <20170403115545.GK24661@dhcp22.suse.cz> <20170403195830.64libncet5l6vuvb@arbab-laptop> <20170403202337.GA12482@dhcp22.suse.cz> <20170403204213.rs7k2cvsnconel2z@arbab-laptop> <20170404072329.GA15132@dhcp22.suse.cz> <20170404073412.GC15132@dhcp22.suse.cz> <20170404082302.GE15132@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170404082302.GE15132@dhcp22.suse.cz> Organization: IBM Linux Technology Center User-Agent: NeoMutt/20170306 (1.8.0) X-TM-AS-GCONF: 00 x-cbid: 17040416-0008-0000-0000-000001E532EB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006881; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00843018; UDB=6.00415321; IPR=6.00621193; BA=6.00005265; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014908; XFM=3.00000013; UTC=2017-04-04 16:02:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040416-0009-0000-0000-0000345E78DD Message-Id: <20170404160239.ftvuxklioo6zvuxl@arbab-laptop> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-04_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704040138 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 937 Lines: 32 On Tue, Apr 04, 2017 at 10:23:02AM +0200, Michal Hocko wrote: >diff --git a/drivers/base/node.c b/drivers/base/node.c >index 5548f9686016..ee080a35e869 100644 >--- a/drivers/base/node.c >+++ b/drivers/base/node.c >@@ -368,8 +368,6 @@ int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) > } > > #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE >-#define page_initialized(page) (page->lru.next) >- > static int __ref get_nid_for_pfn(unsigned long pfn) > { > struct page *page; >@@ -380,9 +378,6 @@ static int __ref get_nid_for_pfn(unsigned long pfn) > if (system_state == SYSTEM_BOOTING) > return early_pfn_to_nid(pfn); > #endif >- page = pfn_to_page(pfn); >- if (!page_initialized(page)) >- return -1; > return pfn_to_nid(pfn); > } > You can get rid of 'page' altogether. drivers/base/node.c: In function ‘get_nid_for_pfn’: drivers/base/node.c:373:15: warning: unused variable ‘page’ [-Wunused-variable] -- Reza Arbab