From patchwork Thu Jul 1 01:53:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12353309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46389C11F69 for ; Thu, 1 Jul 2021 01:53:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F096661468 for ; Thu, 1 Jul 2021 01:53:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F096661468 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 79D138D0251; Wed, 30 Jun 2021 21:53:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74C038D024F; Wed, 30 Jun 2021 21:53:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5ED998D0251; Wed, 30 Jun 2021 21:53:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 341B38D024F for ; Wed, 30 Jun 2021 21:53:55 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 081B9824C430 for ; Thu, 1 Jul 2021 01:53:55 +0000 (UTC) X-FDA: 78312348030.10.4D95D12 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf18.hostedemail.com (Postfix) with ESMTP id B87CA400208C for ; Thu, 1 Jul 2021 01:53:54 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id BCC0261241; Thu, 1 Jul 2021 01:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1625104434; bh=yr/BES2r1OLP3gTpr5e8JAFHenZo65BslROVqtKgAIo=; h=Date:From:To:Subject:In-Reply-To:From; b=MqrjW8MocjoeMMezmi1b08j7SUYL0QICceE5ifjlTitE6h+wY1eCTTayCo324WfZi j9I5LNx8eRfXw1Z7+qhap03gx9ehYJXeqjjO/Ww719e3WHSz+4NPgdxhwWXfvdUCnK +KW0jjc8hMbaonW3wu5AiyLHqXtn2bQ+mjQdHptM= Date: Wed, 30 Jun 2021 18:53:53 -0700 From: Andrew Morton To: akpm@linux-foundation.org, david@redhat.com, ddstreet@ieee.org, linux-mm@kvack.org, mgorman@techsingularity.net, mhocko@kernel.org, mm-commits@vger.kernel.org, shy828301@gmail.com, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [patch 126/192] mm/page_alloc: move prototype for find_suitable_fallback Message-ID: <20210701015353.P4XRjHhzz%akpm@linux-foundation.org> In-Reply-To: <20210630184624.9ca1937310b0dd5ce66b30e7@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=MqrjW8Mo; spf=pass (imf18.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: wpch6pw9d3dy3fbst1yydmeox6iwu7it X-Rspamd-Queue-Id: B87CA400208C X-Rspamd-Server: rspam06 X-HE-Tag: 1625104434-256896 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Mel Gorman Subject: mm/page_alloc: move prototype for find_suitable_fallback make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/page_alloc.c:2670:5: warning: no previous prototype for `find_suitable_fallback' [-Wmissing-prototypes] int find_suitable_fallback(struct free_area *area, unsigned int order, ^~~~~~~~~~~~~~~~~~~~~~ find_suitable_fallback is only shared outside of page_alloc.c for CONFIG_COMPACTION but to suppress the warning, move the protype outside of CONFIG_COMPACTION. It is not worth the effort at this time to find a clever way of allowing compaction.c to share the code or avoid the use entirely as the function is called on relatively slow paths. Link: https://lkml.kernel.org/r/20210520084809.8576-14-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Yang Shi Acked-by: Vlastimil Babka Cc: Dan Streetman Cc: David Hildenbrand Cc: Michal Hocko Signed-off-by: Andrew Morton --- mm/internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/internal.h~mm-page_alloc-move-prototype-for-find_suitable_fallback +++ a/mm/internal.h @@ -274,11 +274,10 @@ isolate_freepages_range(struct compact_c int isolate_migratepages_range(struct compact_control *cc, unsigned long low_pfn, unsigned long end_pfn); +#endif int find_suitable_fallback(struct free_area *area, unsigned int order, int migratetype, bool only_stealable, bool *can_steal); -#endif - /* * This function returns the order of a free page in the buddy system. In * general, page_zone(page)->lock must be held by the caller to prevent the