Received: by 10.192.165.148 with SMTP id m20csp5200796imm; Wed, 9 May 2018 00:44:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoKPhVoNE3HRUXurEYNA415rJ2FVFzQmeYIKN9pbsQgdTAHf2C9CPpoxQB1xuoq/Tppu+ww X-Received: by 2002:a65:64d0:: with SMTP id t16-v6mr17707250pgv.9.1525851867279; Wed, 09 May 2018 00:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525851867; cv=none; d=google.com; s=arc-20160816; b=lzF+KYiBssNasxzas0NQ3adCFNAVqqBYr2uDWI1euJoWE5GFHeKRb9cI0O821Mf8Ky yJfrSIilr+8jZNYm9IFnGWtNLwXD+xN+MsERR2ZOEjFAZq1/ju9yrkHS9CEfSW0HaC0N +oM1iXjrNVBCqxB5ya+FZg7RM8iewPcqIXIcRE70pM7LH6pY2p748g6pdSdLIm1qUg9R mTqDIbi7N+h0Fl+FYyDHpRLqqTwUeNd8xsduJbP8KTzT7XVlFb6EeC5hcunigpPin7Sg JODQ1yucLByXXttxIX7tAjYpT7WQbmp7dE3ZQQlLCYPfNKJ/NjJdJ89RmVht/+LQ89Qe 03sg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=NFdEqDofSLFc/Zq8h5C7mjdd2XkbLEP0N5FwbpGzfho=; b=s87KBke8NDmDbdLyWiyp8fMNQRGdQqT7dYE7+aBvBYot46ttR3epxR6z41U2QHy8zG 0YozwiBqffYKhX3SVSnhk/YiYQPyvSUaZ46HEU4o14r5Xe1jpY63q7bYTnUQwvvXZ5oQ 68kzXyqiuTHPHj1MYOovXRj7IL9daleAdG3i0En0/Nh3XZOkV3dTWRzOUTX1AXdCRpkw nK4UYL8b15tDhjScA5foliZrE5MXnYb3O99sVbdPpMbeVf/WKdXJq3h65Tw2HyOX7KlC JyUp/YmOfHyLuhci4HrNYSDx48aOn411j/te39jtEq2zFBb1u+EqQAY9V3VeKx0V15GD iwUw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si25217223pfh.271.2018.05.09.00.44.12; Wed, 09 May 2018 00:44:27 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933774AbeEIHoC (ORCPT + 99 others); Wed, 9 May 2018 03:44:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:57569 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933383AbeEIHoB (ORCPT ); Wed, 9 May 2018 03:44:01 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C9A68AD4B; Wed, 9 May 2018 07:43:59 +0000 (UTC) Date: Wed, 9 May 2018 09:43:57 +0200 From: Michal Hocko To: Mathieu Malaterre Cc: Andrew Morton , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Tetsuo Handa , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: move =?utf-8?Q?function_?= =?utf-8?Q?=E2=80=98is=5Fpageblock=5Fremovable=5Fnolock?= =?utf-8?B?4oCZ?= inside blockers Message-ID: <20180509074357.GB32366@dhcp22.suse.cz> References: <20180505201107.21070-1-malat@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180505201107.21070-1-malat@debian.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat 05-05-18 22:11:06, Mathieu Malaterre wrote: > Function ‘is_pageblock_removable_nolock’ is not used unless > CONFIG_MEMORY_HOTREMOVE is activated. Move it in between #ifdef sentinel to > match prototype in . Silence gcc warning (W=1): > > mm/page_alloc.c:7704:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes] Could you move is_pageblock_removable_nolock to mm/memory_hotplug.c and make it static instead? There is only one caller is_mem_section_removable so there shouldn't be any real reason to have it extern and add more ifdefs. > Signed-off-by: Mathieu Malaterre > --- > mm/page_alloc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 905db9d7962f..94ca579938e5 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -7701,6 +7701,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count, > return false; > } > > +#ifdef CONFIG_MEMORY_HOTREMOVE > bool is_pageblock_removable_nolock(struct page *page) > { > struct zone *zone; > @@ -7723,6 +7724,7 @@ bool is_pageblock_removable_nolock(struct page *page) > > return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true); > } > +#endif > > #if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) > > -- > 2.11.0 > -- Michal Hocko SUSE Labs