Received: by 10.192.165.148 with SMTP id m20csp1480394imm; Sat, 5 May 2018 13:11:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp0CxbdMmLzP+TV731e3fZ/BoRU7jUZ4g4cmNeELBTEzic/BanYxnEmtwO+JSRU/jQV9ekx X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr31753397pld.315.1525551097269; Sat, 05 May 2018 13:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525551097; cv=none; d=google.com; s=arc-20160816; b=txUVOKGO0wjP8KlfACz8vISOtPYFBcaToVjmQOEKSZfOwiitnHY1ZWVkOK2Gg3KEF+ NNkCjitg83tv4HLwQRvMilq/aPADvH5MQutbFMXTvXCIS0Y7JIBTIPtndecLK0sUflFf t0RgdPgeLenFi0UqEbV1WkiscQ/rBg8/AUz9aVwUNHXfnSl9GraGt86X2VSq2hOrzCrp VwAdCtSZMSgXS3tqy4QqVwyfWz5b7kDCNL/4Q49Qj5aIH9vBifc2YiEphTSu+qVSPObb hz3TbDWcKP95PfAlQDOkE0Nmxra/qgQeJGP7jgr+Rekr5547Dfw+o7GgeGnu2g/Npffb IWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=vz9WE4apERPNQ/c1gJ68ktzyoqys3ykeNAwKgKIaG2uvFq0VZLhX9SkTn0XipSr7V0 6C14f7xkrMTNyPLNDLfjenfkvvAlicxJfLQNxDTIMSctMf93igqtRezX+yod/fJoI4oT FdzI7DdxRhEjDALc/dOW5RRUgzadwRgyS6J+qyMHR1oVWkrEhi/VzgVhVbthdppYyhc/ Xw7owZPqhNsJAY4AIB86zXgclpiEbGTotmJZSeYOMw+9B8otGE/VJ1VVkuXHPLLv63gW /fLRYHMjUoqA3qmuS+Ku9bJkkiCmbWFbl8rsAJyP7YydNc1NuNcwTPIb/GSVyUAe2Lma sg1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sHvMzpjr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t185-v6si15097066pgd.487.2018.05.05.13.11.21; Sat, 05 May 2018 13:11:37 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sHvMzpjr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751795AbeEEULN (ORCPT + 99 others); Sat, 5 May 2018 16:11:13 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39437 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbeEEULM (ORCPT ); Sat, 5 May 2018 16:11:12 -0400 Received: by mail-wr0-f195.google.com with SMTP id q3-v6so24200091wrj.6 for ; Sat, 05 May 2018 13:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=sHvMzpjrI8xvDovMBKMcvh/7UmkBa+mO8PSLx0IZFvoHpG/Bk4hTbm7Frg8YpAy976 B+BScpzdnUkkiyRU6L+FOI7QfNpZEeAbE42yseT+oO2/wnUboXDnS7ScYLW5P4oj9gtB GKbqWSi42P0Co1g1+kPjzr1tGeTm13p+TrRN6zoN9bLI8yhciOFHx6hH/RNXCHW53Anf M7sRDfSM8jhaA5KiSE0aszKMkfcocBuaHoAYGH4jnyD9BH0Vt1gnvfx444Eq8fPCFAnq 0wObohz188On2eY6t5wR3B/hLK/deqx21z8jvFCEyVzWwnjPVdp0TrcjoR/OZYmHvDEG 4BQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=vgQdppPmzUUD5d+X4pd+18b7lkVzgLGg/Q1ffIw1b/0=; b=MyL01eUz65WZsCaqV8Eov5c77bkDdVhSETz7Bv8a6YnXJTQ5OXEWorJza2VcCPCVS5 mgFRemjmG9YMFliiC5AZPPMGyD9hVHFFwDamGrTyqOQ9p9BL0W6dqUarVkyEQZ3EZDC4 hdBOlAogALw2089FeF1U37/UIaj+xGq9Cn5r6RMYJQNlGHrmQ41TZZQqBajrTOG15ZK7 GDQ0elylDBioGyceqFmnNuTHweHR/JCNgkqJx8fjSnmIKbZNfk8AReXkT2uw+YqoCkCS tiI2ENAoP1la8TPgoE1fPDuAfk6McaIIh0vjnXviP68ncKHw8xmAGc4Gwb9hUq/Hxamb upsQ== X-Gm-Message-State: ALQs6tDVs5zFuYOM+y52h3JF+UPVOiJHRnq6XFREDCGdvEhFPLL1SbDP tRs0aIFzV6LOdTSjBpEkYQ8= X-Received: by 2002:adf:c3cd:: with SMTP id d13-v6mr21096188wrg.282.1525551070891; Sat, 05 May 2018 13:11:10 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id k89-v6sm5474029wmc.46.2018.05.05.13.11.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 05 May 2018 13:11:10 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 35C8310C0604; Sat, 5 May 2018 22:11:09 +0200 (CEST) From: Mathieu Malaterre To: Andrew Morton Cc: Mathieu Malaterre , Michal Hocko , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Tetsuo Handa , Joonsoo Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] =?UTF-8?q?mm:=20move=20function=20=E2=80=98is=5Fpageblock?= =?UTF-8?q?=5Fremovable=5Fnolock=E2=80=99=20inside=20blockers?= Date: Sat, 5 May 2018 22:11:06 +0200 Message-Id: <20180505201107.21070-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] 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