From patchwork Wed May 17 13:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56222C7EE22 for ; Wed, 17 May 2023 13:11:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA390280001; Wed, 17 May 2023 09:11:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E5423900003; Wed, 17 May 2023 09:11:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1EEF280001; Wed, 17 May 2023 09:11:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C2166900003 for ; Wed, 17 May 2023 09:11:57 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8861A120298 for ; Wed, 17 May 2023 13:11:57 +0000 (UTC) X-FDA: 80799784674.04.6E39621 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 9A6AB40014 for ; Wed, 17 May 2023 13:11:55 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KeFwGIi3; spf=pass (imf01.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684329115; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=EgYcW3NJ4Afd832lc68P1zV3oe/HxWnsa2efn8tZlaI=; b=yhW2Vr0DTEpry2trAO5hdsIpSixdvXAtK2X1r0TZBISUrermjhX9ODJfxhGRzA0gRkaG1x MMltLzOwLjs0JVKc7GSQxSWrh0bkw4CFLvlF0gRO1zCNMa3tFMNP6tLDXwi4KUM1JIOcbo 1mEWyU/zPOjE1Tkw9972ffVl69d5pwE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329115; a=rsa-sha256; cv=none; b=epHKDAgoYhM/m2w7MBPwPaIxqcCiu2cTqpdhWpnMUocishAdZHHY+FE3dzCpbjlPOtgF2b x96yFNle7pHuk10f6Pjkgwm3uz2eL7gwbWMBSMz06EEnjvlz3Hp6i3atPaTy0WPLQeMSnm jaxBXmEXvslURiDt9stI0ralDoLddaA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KeFwGIi3; spf=pass (imf01.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9BFB364710; Wed, 17 May 2023 13:11:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFB3FC433A0; Wed, 17 May 2023 13:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329114; bh=9B5dm6uPcP99pu9DbgwVzUA/R+xqpwJ+x8zkV0/Vqc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KeFwGIi38GKw31XBFip9DpSNaAPrSt+ly1tSHZlHJrUQWVYjO1Fj/sEgW+9BoVS0P 1CrH3z3kj7gZ+Vr3uvhUt8V+7wc31EPrn9XE0ouppLIc4CVNNyDqrxV3hSyS0OYCcT l6bP27FiyG5vaBbcs1CEMoLgy4FK3NoP8/k/lHQ4NbbcS554m3wfxgTcIxR8LnL/1k w4FDAsAOVUKikEub9HmaUUnNVrFTBKOFClJ6tqzPc8F5THSvUHsl1wW7KSrODpL1Hc vIHWM9fXWcirhdtfcUUfuWVrVUe5drsdLKZft1YCHcGKupFyIGgZk3oWSTFEILf4s7 1sLZ52Eo3Zk7g== From: Arnd Bergmann To: Andrew Morton Cc: linux-mm@kvack.org, Arnd Bergmann , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , Helge Deller , Michael Ellerman , Palmer Dabbelt , Heiko Carstens , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "Rafael J. Wysocki" , Paul Moore , Eric Paris , Dennis Zhou , Tejun Heo , Christoph Lameter , Pavel Machek , Peter Zijlstra , Waiman Long , Boqun Feng , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, audit@vger.kernel.org, linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: [PATCH 02/14] mm: page_poison: always declare __kernel_map_pages() function Date: Wed, 17 May 2023 15:10:50 +0200 Message-Id: <20230517131102.934196-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517131102.934196-1-arnd@kernel.org> References: <20230517131102.934196-1-arnd@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 9A6AB40014 X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: fg37ynstp1awyisre8emtm9c3b4ias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IkB+51fg+8Eq305GPN1AJdiPL8ocdtc6AQtMVT35EfF/1/672W1SUlDSrh3YAAGXN5MetgzapNngQj9/w6+D+RuaBzeOJvG5EVN2TSbg7eUTzhP5K85UC7cFq1gz3RkrgFLcxb2iAkyNKBBPqLRBk7onjnEWW6L8X4vrHOid8K3tkLa/jEP+EAqcPelpmqyW4+oS0r+HiKZ1fKAbRDOLjL6FqcbHNWxxyDaIoa0TFD8Aost1VWrmpkAb4xGSzMGnA/OFpAAfN35mQ5mU3StWyItyo5NZ9gvd5WrcHiozfbFA5fmLMjsMhDyTixpP4vx5JRMtleWT+g= 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: Arnd Bergmann The __kernel_map_pages() function is mainly used for CONFIG_DEBUG_PAGEALLOC, but has a number of architecture specific definitions that may also be used in other configurations, as well as a global fallback definition for architectures that do not support DEBUG_PAGEALLOC. When the option is disabled, any definitions without the prototype cause a warning: mm/page_poison.c:102:6: error: no previous prototype for '__kernel_map_pages' [-Werror=missing-prototypes] The function is a trivial nop here, so just declare it anyway to avoid the warning. Signed-off-by: Arnd Bergmann --- include/linux/mm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 27ce77080c79..e95d7c575ea6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3453,13 +3453,12 @@ static inline bool debug_pagealloc_enabled_static(void) return static_branch_unlikely(&_debug_pagealloc_enabled); } -#ifdef CONFIG_DEBUG_PAGEALLOC /* * To support DEBUG_PAGEALLOC architecture must ensure that * __kernel_map_pages() never fails */ extern void __kernel_map_pages(struct page *page, int numpages, int enable); - +#ifdef CONFIG_DEBUG_PAGEALLOC static inline void debug_pagealloc_map_pages(struct page *page, int numpages) { if (debug_pagealloc_enabled_static())