From patchwork Tue Feb 9 14:15:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102821 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2068723lbl; Tue, 9 Feb 2016 06:15:51 -0800 (PST) X-Received: by 10.66.118.198 with SMTP id ko6mr50391500pab.122.1455027351004; Tue, 09 Feb 2016 06:15:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uk9si54329673pac.166.2016.02.09.06.15.50; Tue, 09 Feb 2016 06:15:50 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757021AbcBIOPs (ORCPT + 30 others); Tue, 9 Feb 2016 09:15:48 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:58262 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756375AbcBIOPq (ORCPT ); Tue, 9 Feb 2016 09:15:46 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0Mc5pe-1amK7c33gc-00JKyZ; Tue, 09 Feb 2016 15:15:42 +0100 From: Arnd Bergmann To: Vlastimil Babka , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: mm, compaction: fix build errors with kcompactd Date: Tue, 09 Feb 2016 15:15:39 +0100 Message-ID: <9230470.QhrU67iB7h@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; )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ender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added kcompactd code introduces multiple build errors: include/linux/compaction.h:91:12: error: 'kcompactd_run' defined but not used [-Werror=unused-function] mm/compaction.c:1953:2: error: implicit declaration of function 'hotcpu_notifier' [-Werror=implicit-function-declaration] This marks the new empty wrapper functions as 'inline' to avoid unused-function warnings, and includes linux/cpu.h to get the hotcpu_notifier declaration. Fixes: 8364acdfa45a ("mm, compaction: introduce kcompactd") Signed-off-by: Arnd Bergmann --- I stumbled over this while trying out the mmots patches today for an unrelated reason. diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 1367c0564d42..d7c8de583a23 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h @@ -88,15 +88,15 @@ static inline bool compaction_deferred(struct zone *zone, int order) return true; } -static int kcompactd_run(int nid) +static inline int kcompactd_run(int nid) { return 0; } -static void kcompactd_stop(int nid) +static inline void kcompactd_stop(int nid) { } -static void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx) +static inline void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx) { } diff --git a/mm/compaction.c b/mm/compaction.c index 67bb651c56b1..4cb1c2ef5abb 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -7,6 +7,7 @@ * * Copyright IBM Corp. 2007-2010 Mel Gorman */ +#include #include #include #include