From patchwork Wed May 17 13:10:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244890 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 1BD6FC7EE23 for ; Wed, 17 May 2023 13:11:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 99A47900005; Wed, 17 May 2023 09:11:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 94AB1900003; Wed, 17 May 2023 09:11:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 812FE900005; Wed, 17 May 2023 09:11:51 -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 740DF900003 for ; Wed, 17 May 2023 09:11:51 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 31401405A6 for ; Wed, 17 May 2023 13:11:51 +0000 (UTC) X-FDA: 80799784422.05.4EC570E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id BC57E180018 for ; Wed, 17 May 2023 13:11:47 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Fc6SUEmS; spf=pass (imf24.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=1684329107; 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=riQpLaodmBuhnxyV33cJ8rjFHN5lOoiBF7pDvIrFlF4=; b=1NmY7HPyZX6XlPmfD2WBSc/kN5S4pKyeqTkKcu/e8v1YJhwaa2+nvpxDeiR1sijxieGYwa e1ecOT1bjv+dTPr6vGOZQ458tjE8tgRAAt//lHWgK33t5fcTmPpFCGpnLDYDtLJR0fs32o jsrElN4oIGgUn5Pt/gXLdAPWsW7YSXg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329107; a=rsa-sha256; cv=none; b=meLsx144lFOtVyNVwX8c7uVwCGVPrkGJ/HzuknlF5tlzKUT44ezpTeoHwAY1lDvJboqf6e BWXw1DH6m9IUaF47k/e1UBvZemyfCkNydaaGKg2p2wiFJQZs7scc21Qn1ljkg0N32V+J5N uflLH4KVMqSx/7hZGExakHNa37OkolY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Fc6SUEmS; spf=pass (imf24.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 EBCE1646FD; Wed, 17 May 2023 13:11:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C17AC433A1; Wed, 17 May 2023 13:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329106; bh=3mI163DMR4d+cuXu5u65rsW45kyqp2CKp+3eSlb6arE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fc6SUEmSZTQUkEUQjfQXj6txmruIJCzCuO4Ae3j0P53kfZPDs/OWZkdHVUzrtWv5M 0rPrYmGV3lkc2LdVoiXnN0tesbaj+I+HdnU+5OYNZ19tKdQSCcQFdCfF7CIjRf43g3 HHrOqIEp3ibRRhUsGRDH+Iul9ef7vI7xGy9SOg7wZXkSxKf5Bbrmmph902wZT+4dAO hkBdrDx6I/lx0He0nfCXC9E/60W8qZMraYv4eYeOaM6lvyD6ZDXWH5H+onPY0eEF1E Z4hxRtdg3qOggQ4VULZzLpo6PInRLslC9REuvbQ434IZjCDyjjo139W2Et9i6tb9pM t75TKQPb0GvKQ== 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 01/14] mm: percpu: unhide pcpu_embed_first_chunk prototype Date: Wed, 17 May 2023 15:10:49 +0200 Message-Id: <20230517131102.934196-2-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-Stat-Signature: yuyut1wgdg5cu4m7663ijuj93y3au6fp X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: BC57E180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vuxY7tZYiDJDXvv+Vp+/FPEKqzaL3v3j4kjwQQ1b2TNnOHTYyik9dSs5DA3+HCKGY2rlPwVnD8bTebeE52+tiMPj2C09li4ORQOJ9tKmV7L4xj62havzY89vB9e5jTOXggbPA90C9Wgwp9yn7SYSf5/Ug8N7aXywhdzNEhmoxT+UIazZ6TLS8CHmCEg1eXR8y1UjYU2O+gjHZiL10kZU/OgvBOl//9IrGceTobQskYuPNCq9bZIK/ytuAffj6n2C6yEP+H/Z8Eb70JWCDRkYua8hNuYWGR+g+1lpi7tPM0JYQnfasgDO4hkKs9NL1RtjvM/zNBR6+psUDJ5i38= 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 This function is called whenever CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK or CONFIG_HAVE_SETUP_PER_CPU_AREA, but only declared when the former is set: mm/percpu.c:3055:12: error: no previous prototype for 'pcpu_embed_first_chunk' [-Werror=missing-prototypes] There is no real point in hiding declarations, so just remove the #ifdef here. Signed-off-by: Arnd Bergmann --- include/linux/percpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 1338ea2aa720..42125cf9c506 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -103,12 +103,10 @@ extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai); extern void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr); -#ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK extern int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn); -#endif #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK void __init pcpu_populate_pte(unsigned long addr); 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: fg37ynstp1awyisre8emtm9c3b4ias1t X-HE-Tag: 1684329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N1AJdiPL8ocdtc6AQtMVT35EfF/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()) From patchwork Wed May 17 13:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244892 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 F1560C7EE30 for ; Wed, 17 May 2023 13:12:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72ACD900006; Wed, 17 May 2023 09:12:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 700DA900003; Wed, 17 May 2023 09:12:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A16B900006; Wed, 17 May 2023 09:12:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4C3ED900003 for ; Wed, 17 May 2023 09:12:05 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0BD0214054E for ; Wed, 17 May 2023 13:12:05 +0000 (UTC) X-FDA: 80799785010.06.2E44CB3 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 4204740023 for ; Wed, 17 May 2023 13:12:02 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=EYIGhjsk; 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=1684329123; 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=ObHkjYuDDGZrxBzUEU5nWl/ziVV5tY5rqiTA62zFkJ8=; b=ylaCLofCuGoRFJlh3Pe7WjR01fkCdfnkx7Ywf9kvyVtwm7TBiP6qrJx5zkawMAPQ1YFNZl 7CJak7vasJ2weTcz4CTi5vsrdLqXwiOrUHQWnzXhd38v9URl52WyYeyPjU838+ofVdck7E wsOCE02nHBCiuspq73xWZDipzj1ig0s= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=EYIGhjsk; 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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329123; a=rsa-sha256; cv=none; b=B9OciEWRwNnURFWmZoGOMrflb3K02Q0GTUEqeMdDiP3iu+mxntmsIegzuDpIvBii/WvWiG MtaZI/x7c4Ds6CKXBiqhvqzG9aFSkZyV3/i7GdLsGV+18MXqU/SZ9SnmmsrcvPL6T2543N UhDajObcP9G3pnuzHI+QCrOnYCO9vYg= 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 49DC4646FF; Wed, 17 May 2023 13:12:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E14AC433A1; Wed, 17 May 2023 13:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329121; bh=ZEuLmqNfBu4LwIeDkvzu7YMjKyFq0rMolN8SHAt1hRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYIGhjskS/xv5B1p/ij9PND0/tmwkdiUYlvegDshPwFUbpxuTFyigABp4MTrw0TuQ P78r6F9mokfxX2GOn5NNxJ7Y8gpKeQ2JIJPOlwKyXwrocJSsJPMgZ5so90ndZnWLIH aGDrxnHeZ7PSsfX8ujY8+iBUJh64lKQ8tuj1W6/9ZjHk9UY72TP6XbnI7D4PlCH7We aaUModTzCCSrDAZVc+++qyvzPpkjq5ahpjt1CIVik3sjBmumD9LM7YmBA788qeLjcM 2OMcn8FcIbxKuRPscWnHIx9nPzp5O441qpjTVop2Tg6G0Jcnayutfz950N7PCb338P sb4vFIfH5scjQ== 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 03/14] mm: sparse: mark populate_section_memmap() static Date: Wed, 17 May 2023 15:10:51 +0200 Message-Id: <20230517131102.934196-4-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-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 4204740023 X-Stat-Signature: pc4dn8wzf13ogaaijmufwpfwrs9zcrna X-HE-Tag: 1684329122-860075 X-HE-Meta: U2FsdGVkX1+uhDUzdBkXKJBQ6o29RDruarL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1eTUdqKYs7cdjNoM3iYzfEO54/cLhuyYl4dXOhY/cet54Xtu1gQmtVkFJh1BGTrbzbcpRCnkLUlpF8AqOCcudrY/QTYFoNxcgblykP93QrTmQ3tx7WYyxXwvbly7FF+xnMgmyU014VociI/HXb+dVaEIEsCxPoJuZ0qahHfdF9zF4VMLwGbvY69ZW5BpQ8fmIt5osdrXIT5lKB5W9kYOkQAKg2BlWJKvTGTPVxsCPtmtwItsRaZtk9m7R2Kw1WjRLK3huIIF+Ap4= 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 There are two definitions of this function, but the second one lacks the 'static' annotation: mm/sparse.c:704:25: error: no previous prototype for 'populate_section_memmap' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann --- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/sparse.c b/mm/sparse.c index c2afdb26039e..b8d5d58fe240 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -701,7 +701,7 @@ static int fill_subsection_map(unsigned long pfn, unsigned long nr_pages) return rc; } #else -struct page * __meminit populate_section_memmap(unsigned long pfn, +static struct page * __meminit populate_section_memmap(unsigned long pfn, unsigned long nr_pages, int nid, struct vmem_altmap *altmap, struct dev_pagemap *pgmap) { From patchwork Wed May 17 13:10:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244894 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 3BDADC7EE22 for ; Wed, 17 May 2023 13:12:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA7AE900003; Wed, 17 May 2023 09:12:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C59E9280003; Wed, 17 May 2023 09:12:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFC69900007; Wed, 17 May 2023 09:12:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9F078900003 for ; Wed, 17 May 2023 09:12:13 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 1E111804B6 for ; Wed, 17 May 2023 13:12:13 +0000 (UTC) X-FDA: 80799785346.21.F919746 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf14.hostedemail.com (Postfix) with ESMTP id F151510000D for ; Wed, 17 May 2023 13:12:10 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I6TCINxJ; spf=pass (imf14.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329131; a=rsa-sha256; cv=none; b=iKysH3K09sRqcXvvMhnybmcFZMdUzDzIwc2dbyHMEYW4llNKtltcoAldzKteXwWwdIWiCe uJFhMDuuFnZzeTffI0OrcVTuCobWWSf3eMDKL1rRFmR71O35aW9NLdJtp6IcLnUUJJmqv9 /3l6h4Z7+a+/LMY7yEDK72gxLPSUI2w= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=I6TCINxJ; spf=pass (imf14.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=1684329131; 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=FtDFA91ypS9ZA0IR38/PvWFBEIGzGOUQK4+dY24nL+I=; b=S3cPKuignkeI4LnTqcZ3hV4nSCg5Td5Kqv86/n8LRAAcSavKSuTwzBkEF8NOpBUhNC51Xh gqoc0r/IgMvmf9G+BGHmRrcDobhUWJHvhc7YrPYgg1syOxIQhM2K5HfGFCk1JQ7xhSVdEf WdBwqCXYD9d8Q7mNdW+ULLbd/co/we0= 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 EF48963B88; Wed, 17 May 2023 13:12:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E219C433A8; Wed, 17 May 2023 13:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329129; bh=m4CC8jzjsL/DB4zhl/Y597jyiUuMzUYclEl5YRgzTWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I6TCINxJI0woqSGR6ssIvaSj6epLLVO81LOzyVaPT8/vzZI9AB8IWfkQCSXQEHhXj emmu7MtAnphbx6efp3NtZZlhdUPe7PobFSbrgE0GW1MxwsjqRKhXtsARowKgI7TJl1 M8K+xUmMlgWQeI0sMhDqBlo2KcTRfdwZaRrzSuAmdzwi2gCudljKNjdsRsUPUgknLD dFngQPAXjy/SCR0E/q5jywBkSs9H4bdCiuKXgEHWHkpEKogI02+rydRudhNs/4FwF/ rKa/Win+V5kAOFnp1Q7tVYGNdR9eUslE6Gou6+cruOq5EcoezzwmGP3r8Tp1Dhm35i hSLiw0TbCv7FA== 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 04/14] audit: avoid missing-prototype warnings Date: Wed, 17 May 2023 15:10:52 +0200 Message-Id: <20230517131102.934196-5-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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: F151510000D X-Stat-Signature: 7tjq6dk1oh9kasy1oddzqw4bkuhzgi6a X-HE-Tag: 1684329130-671796 X-HE-Meta: U2FsdGVkX19eymGcOsiY+iuAdlpsqIdvdapU6X+kV5DSWkZ7tsQNLq6wL8UjGHxWskmtFAKpBUV6UQTm6Xdnz7f6jv4G/E8eccCNu5hWdQvPqkKSBMciSktfKh8lSdwS1zHKLZbb/8woTbNn1d9WSL2tBzOA7ibPZsXYTTRBG6SBBnXUmn9IcS5qtxOA7Dxx0rvMzp14x6rVfrKZ2NB11nuzotb04igli/CBu/yXMLqh18j5KOp3+zQzx3qavPqDsdzuHCvsNrCrlo/4UEbIMXIzZwlSD6x6T9wvzstBwMY1dM7XXg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.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Arnd Bergmann Building with 'make W=1' reveals two function definitions without a previous prototype in the audit code: lib/compat_audit.c:32:5: error: no previous prototype for 'audit_classify_compat_syscall' [-Werror=missing-prototypes] kernel/audit.c:1813:14: error: no previous prototype for 'audit_serial' [-Werror=missing-prototypes] The first one needs a declaration from linux/audit.h but cannot include that header without causing conflicting (compat) syscall number definitions, so move the it into linux/audit_arch.h. The second one is declared conditionally based on CONFIG_AUDITSYSCALL but needed as a local function even when that option is disabled, so move the declaration out of the #ifdef block. Signed-off-by: Arnd Bergmann --- include/linux/audit.h | 2 -- include/linux/audit_arch.h | 2 ++ kernel/audit.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/audit.h b/include/linux/audit.h index 31086a72e32a..6a3a9e122bb5 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -130,8 +130,6 @@ extern unsigned compat_dir_class[]; extern unsigned compat_chattr_class[]; extern unsigned compat_signal_class[]; -extern int audit_classify_compat_syscall(int abi, unsigned syscall); - /* audit_names->type values */ #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ #define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */ diff --git a/include/linux/audit_arch.h b/include/linux/audit_arch.h index 8fdb1afe251a..0e34d673ef17 100644 --- a/include/linux/audit_arch.h +++ b/include/linux/audit_arch.h @@ -21,4 +21,6 @@ enum auditsc_class_t { AUDITSC_NVALS /* count */ }; +extern int audit_classify_compat_syscall(int abi, unsigned syscall); + #endif diff --git a/kernel/audit.h b/kernel/audit.h index c57b008b9914..94738bce40b2 100644 --- a/kernel/audit.h +++ b/kernel/audit.h @@ -259,8 +259,8 @@ extern struct tty_struct *audit_get_tty(void); extern void audit_put_tty(struct tty_struct *tty); /* audit watch/mark/tree functions */ -#ifdef CONFIG_AUDITSYSCALL extern unsigned int audit_serial(void); +#ifdef CONFIG_AUDITSYSCALL extern int auditsc_get_stamp(struct audit_context *ctx, struct timespec64 *t, unsigned int *serial); From patchwork Wed May 17 13:10:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244895 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 E209EC77B7F for ; Wed, 17 May 2023 13:12:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7C5CE280004; Wed, 17 May 2023 09:12:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77529280003; Wed, 17 May 2023 09:12:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66495280004; Wed, 17 May 2023 09:12:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 59552280003 for ; Wed, 17 May 2023 09:12:20 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 3573080595 for ; Wed, 17 May 2023 13:12:20 +0000 (UTC) X-FDA: 80799785640.24.1E0E1BA Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 21A2140007 for ; Wed, 17 May 2023 13:12:17 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="tyU1+/JQ"; 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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329138; a=rsa-sha256; cv=none; b=JgEt+NTndgHVYxc+OeFR44VyhfPvEFeUVPm+0+4Oe4Oig4+68sFR0lOj1O96hMdMPeOXwZ 569JYjVfGphc/kfPpF2mLuVhEI0naXp7ByNM6eKw9K+gApLrZXZ5Tmgb4Um2m8J6kOAhB5 W/q971URyWC2+OjAgaq0cJAZzDYWE6U= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="tyU1+/JQ"; 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=1684329138; 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=LjR17H92IQ/a3FzI5Q5mxT/Gc6iGVqfkFAU21hpRmiI=; b=01xRu7CcWqaMQWuurnymoE9cBaXdTojqBhTf16+tvF60720DCzLQfsY6F3ASSFI6T2a35C U64Vf5viF4yuWJHfk9ykeIWk4N8V13ZpDVwgcYgBFjip6SQd/L8KutOq5gzHPXj/8J4uD9 2altHT19vRMylp1ZLZFN25ogQzuwIQ8= 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 3AC8364706; Wed, 17 May 2023 13:12:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D81DCC433A7; Wed, 17 May 2023 13:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329137; bh=7NFY4e1GRdJpBgrCbtxoc1LfzebP5DErPZUbazdtedA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tyU1+/JQyb06JHCoISP/aGPwtCQn0y+G2NG5LZRAoqMZ2rrQjRXynp/TD2rSNP+yu 1MAgn39GOwDx0XjC/LCCoz8eWqzWrh1MPxapDvHcn+PH1s06DifD+01A3XTAew1Xad 7kiU/kNm6uC/vwrOUnFMNzz/s1aP2ZTB5AZ44+nRwW23Ewv7Oudccx2C7eFBMHX70o bRraU85jXL9lIeSgOiof8kzLy3rFvqHD/NGDlZjQWIMKbB80Ds7TOcR89bmpDrx2M6 DjfDS8BLtKEoQUWgQ9ZjdRzMuh416rmJ35iErYbPeR1Cy3wac2W8wJ0tUTeKW2RkF7 Kn4dcDyi8DEBA== 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 05/14] lib: devmem_is_allowed: include linux/io.h Date: Wed, 17 May 2023 15:10:53 +0200 Message-Id: <20230517131102.934196-6-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-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 21A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0rZ20vHzR6y9+9N8yUUoFvs5MNjRyQXCWLqY9aA/aN7bp8ofeH/KR1ov8n/Hr9fZ6XcNu0uWpTmy42RCZFYkS9NFueh8TkEff6WjiOAUHCpFRn8BJrMQiYgcI74t+Iodbco8IrjzuT6tCVH16gjHYPr4igylyoquUfreQYBiPWdy8M6W2sWzwA520rusOEmZpswMyBDcxciv/0tf+THo1w7dekA66FNm7BZHVjc4My06oi+TSfcq8T63s/1PJ/MwIRC7R2OFvjcCxrym7DFIqo0Dnn6ckOPDMFR1wWHjgpkGMid5SVSmv2/n0U3fWZOpaep4Xoz73iNgIef0rMfzIl71GeCcQQsfcp2YFljrLv59gUqq1pSJlVoSZYk8Ej+Vvht3S+Gti24K+FJtD4= 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 devmem_is_allowed() function is defined in a file of the same name, but the declaration is in asm/io.h, which is not included there, causing a W=1 warning: lib/devmem_is_allowed.c:20:5: error: no previous prototype for 'devmem_is_allowed' [-Werror=missing-prototypes] Include the appropriate header to avoid the warning. Signed-off-by: Arnd Bergmann --- lib/devmem_is_allowed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/devmem_is_allowed.c b/lib/devmem_is_allowed.c index 60be9e24bd57..9c060c69f134 100644 --- a/lib/devmem_is_allowed.c +++ b/lib/devmem_is_allowed.c @@ -10,6 +10,7 @@ #include #include +#include /* * devmem_is_allowed() checks to see if /dev/mem access to a certain address From patchwork Wed May 17 13:10:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244896 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 CD89EC7EE23 for ; Wed, 17 May 2023 13:12:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68E00280005; Wed, 17 May 2023 09:12:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 63E10280003; Wed, 17 May 2023 09:12:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52BE6280005; Wed, 17 May 2023 09:12:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 423B5280003 for ; Wed, 17 May 2023 09:12:28 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1A9A3AD4EA for ; Wed, 17 May 2023 13:12:28 +0000 (UTC) X-FDA: 80799785976.15.9E0F259 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 3F0E2A000B for ; Wed, 17 May 2023 13:12:25 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hhmQcB6W; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684329146; 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=OKzeRdedpEc9gpshyDG/mck0jdPGYi7vz5VbYeuS6aU=; b=eTBz+WmWYscRu/P9TFb/8EqHCxoqgIkMOnPEGCDBL8f2vxfbKWijgVQ1ZMS3OHX+mqIhZi w9Lw5WULORcEou05SBGYPnc78OpqsJaMJhHP7JsX3K68a0NCCSpqX7kc3sFYPOL6uQrB3w z7epFdtyAd9gK+yItTLojbAZZm0RAKE= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=hhmQcB6W; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of arnd@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=arnd@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329146; a=rsa-sha256; cv=none; b=tEdUUNHDB5o21oTrOc9R/ReWzJ3l/u0x5yfAudAkLh3rj7iRQGQkgAOdtvYaZyFKDhnmEt J0IQ441nMoTDf+uM3zdpr/DobjihXLx56AHxkxEuBRAnTZVofSpMgCA90KZC2s3rlGpP3Q 3NS5qTq1aBt1eNN+AQveK+hN4z7CLs0= 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 5223764715; Wed, 17 May 2023 13:12:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FF66C4339C; Wed, 17 May 2023 13:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329144; bh=gekqQcdwspAqcYmV4wkiul0gbNa5okADC3lRsox7SxY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hhmQcB6Wb+ZcCRzLdjmx7/zFED4SNzs0NBaokc4G4Ef+SjGqplVRCUUlj8VOql7xc tVzUvC/YohY4HXanpHjF8gzBHtwkxcmoYXP+MIQ4qBiVNrFkbviwAVNhlQFEM5aG9z u0KG2wrGCIiO4fxkS7CsDg7SKssZvao8JQ1WexuQEtCpz47qaTuW3Z1bOQL/MmRcVt J43Gz9r687q17jYwvjwLN9fs0kn3xObEo5/anSq7dT5iAh0lVVtxnk6xLq54trRwvy bwp4gagapMiXtQeSik0KOYf0nVPAhKydrIyt2a5DIE7rfoyB8tfvUPUW3O+QL/VQu3 AKt6l4x3F+ppA== 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 06/14] locking: add lockevent_read() prototype Date: Wed, 17 May 2023 15:10:54 +0200 Message-Id: <20230517131102.934196-7-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-Stat-Signature: br8uybpzbjaddqt3ak881yabjhwacgei X-Rspam-User: X-Rspamd-Queue-Id: 3F0E2A000B X-Rspamd-Server: rspam07 X-HE-Tag: 1684329145-125056 X-HE-Meta: U2FsdGVkX1+dVFteEL498WaoivK5cyWIY5lZCcN9aL7fgdw9qztzxmq+CAzAJOl7Zcn35SgyK6bZGlXY9BwkkZRP0Ro4sTYk6T9VMndw+BKfPEBxJ0fCYD1BiQlFwlw0LKVWWBsNc9YxEQWQYbIjfPcj9CJ3kOiqEhP67U6aQj5TgDoKLygwIGUQoA/ZxycDhuplxImkAbOgV58q2Q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WnIRaEbbOfaZMAn4fU+t5n6nx9NhOq+9FE6A1edGqOx/B72KVw7gQpRD3okGwVdoJfk7KxDvX5vridRW3ZlwJ9P8h4Y= 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 lockevent_read() has a __weak definition and the only caller in kernel/locking/lock_events.c, plus a strong definition in qspinlock_stat.h that overrides it, but no other declaration. This causes a W=1 warning: kernel/locking/lock_events.c:61:16: error: no previous prototype for 'lockevent_read' [-Werror=missing-prototypes] Add shared prototype to avoid the warnings. Signed-off-by: Arnd Bergmann --- kernel/locking/lock_events.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/locking/lock_events.h b/kernel/locking/lock_events.h index 8c7e7d25f09c..a6016b91803d 100644 --- a/kernel/locking/lock_events.h +++ b/kernel/locking/lock_events.h @@ -57,4 +57,8 @@ static inline void __lockevent_add(enum lock_events event, int inc) #define lockevent_cond_inc(ev, c) #endif /* CONFIG_LOCK_EVENT_COUNTS */ + +ssize_t lockevent_read(struct file *file, char __user *user_buf, + size_t count, loff_t *ppos); + #endif /* __LOCKING_LOCK_EVENTS_H */ From patchwork Wed May 17 13:10:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244897 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 47D2FC7EE22 for ; Wed, 17 May 2023 13:12:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D91F9280006; Wed, 17 May 2023 09:12:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D4188280003; Wed, 17 May 2023 09:12:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3100280006; Wed, 17 May 2023 09:12:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B5055280003 for ; Wed, 17 May 2023 09:12:35 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 93AFE140554 for ; Wed, 17 May 2023 13:12:35 +0000 (UTC) X-FDA: 80799786270.23.5663B46 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf18.hostedemail.com (Postfix) with ESMTP id B9B591C0013 for ; Wed, 17 May 2023 13:12:33 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sXIvKHQg; spf=pass (imf18.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=1684329153; 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=CDYpwW1Fx9PeUZeLZC70UUWKtmFBuyf8tKpF+icN7uA=; b=dUB4G7m9X27Ir6UGd5qti0S4tF8uMH9s6OnE5zlTFTeQG1zWEkWLJzzfMR9BMEhLVXEjgV DAx95GZBCQPVOwVxHqRbLdL34qIscYe4nUxD8qbsOEaGsFObRlhYPrnuoJ9id1+ptcmc3G XinQv6lOLeK6p2hsJk97a5T5wEtvlWY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329153; a=rsa-sha256; cv=none; b=fBfqOx5EuZxAPh+AXl8QtiH2RB1a4ZgXwS4Q0pLPyzpGHO/y0s4e1oGRxTIAVJNWsvp1UR QwB9J0gWexidERzEKwalT73MVLgUVhKmKPWiONUIK042MZRbwtU0gMJCdV60v3+aoW6QpQ T7jiQvssHPD3256GBibNROPCeSWOtNU= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sXIvKHQg; spf=pass (imf18.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 E626564717; Wed, 17 May 2023 13:12:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 335BEC433EF; Wed, 17 May 2023 13:12:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329152; bh=wIpq6dQ3SrZ+OFpGPswN9m0xaTqULZnHSrUinkSrQZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sXIvKHQgTrqznMJvGuTDhX84E9WFuYptr8V3Ek7xw2qzSKUVOylJd5AIRFHWD43cs rY9FXAfbijzhcRJ7xB3TlUNAPXZltMOT2Gu4HfBs6rSenBQe9xDB/DkigljyzJ5y0q NqniEOZEjINgmXRhB2DOJQVMCw6aB5m5fkNbmxq0hQ2kjVyy2Rz5uAkz1lxR6GK/pc kmDhZQgZnArP9xfDPRLQii+MbSH3WYm82+2YK1Gsm9qH0+4zeAr7ziGBnxhAtpe3t7 S5c12dcl36AQVcUIP/lTS5gtzL2FAYQNXRSkp6OFpQMsIrlhIqSx17r+jWyW/eaEgJ v4/2vi76yp1wQ== 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 07/14] panic: hide unused global functions Date: Wed, 17 May 2023 15:10:55 +0200 Message-Id: <20230517131102.934196-8-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-Stat-Signature: youpympnzr7d3jn11bszdyyaq8rxwbz9 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: B9B591C0013 X-HE-Tag: 1684329153-394068 X-HE-Meta: U2FsdGVkX1/P+z/Rg1kvdOP280+fJJpOSFGoVVeL9XAHn+TQtPgPeR3VPYR0bW+PJ83MXHhYW2s/v7CH8HogoePHQ9FQmO/nOSoslPqsIUlmtiHe9g4XU/kAKneTAvoFXlZJPkwF7xeowT8j4dru8+CSpR0jmtXqV6h5gA+q8UqodUGkMHeoNQa8Mf2FWOIMUR9ylopz8Nrsuwn0D1ppv1vVhRggCt8A1uasG4pBE9E8ZvUhwqhaCrI6kSoJxBdI7ZK+o8R4NZR9GIT4pZm8Voubm1ik2xjfb9jz5DLOUZcF2/IvSzaex4TxkvyPeDEKziUI1flF6vgI8V1ywRIEvcG44Y6qdoVWOo1OIEWPZpZFJh57y4dGwp3tXIZOpYhPYb+7S7eRBsZVYQvlfNZGTEM/aWelxt3tPl9o4Z/hPQDo+3yBbMO+BFti2hX86XEIGTz2uidQezD4jRkqxOoVABZP6FjQ41l+JgK1isSTDS5ZSDUzkAUy/rtROJYBNZouFDZdpw6+JA16bGH3Gnuz7Mn+1FkYlHMKo3vScPkrBt65/2gOSnJM/Yyj8HsGKQKCn70YZfArevpzYsgtKdJD1mpKCtMed5NYl4QRfIyTp3C6PbnMAfuJh+fy1x+aqhS+VULqbMgSyqGpURoPBnmVO1SOIeCuAo/7we3XPDbt9H9vUneqr4iRWkBbwLd/BvCN7raKA7vykk+GjozZjpYdpurHalTAQSSNUkDj499Ry2p9MvCYn/lHU3Q8yYDJxlwlT14ZJR9A4kIKz5NgB+IpvOFPQUk1qPl8qSFa7jUtRDdHWg5OdWdOf1nQvuy1p6Qh2llibEq4YtGELmgRwgp5XJNxaFPzoPLIGj9iRC6E4/10rtJteXKKJZgwbNmNi5KgwGzENafjkQH7mN2h5uefSu+HA/m3Yb4O+N9pgg6qKd9Or6DmvfF6Ub3xgQduME2RD2kAW4/arGXSkADt1k0 IYfZ8CE+ cDKUUpQaGEglzaYFa+mTFeyOAmH9hpxdEv/OihgpfWDG647mKPmqYbJK9I2KMwQw8k6xlwLLlJXBO+4zHdKptoCQMm6e8Psnr9HKP8StD3LjeaFPPoLQ7QYvBXdGx+XLN6sUN5Cg05V9kYawhFirF27P6iFolN720XA6+9mUgfP7nOlga+Goyx9M4PDoOaD2jitLein9USBWfCk6Obn4vwozVpiidwbnZUp938g5LOSVzkTiP4wW0AQCEc+vFn/HWs/sIrGXkOWFYZEZu+GwFRzIpJ0ZB/mp8sM8pjijnnxEiqpUs64jPafepxDcNMZe0drziiCNfglrhLoa/k+LtBofGqJpZAsak189U 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 Building with W=1 shows warnings about two functions that have no declaration or caller in certain configurations: kernel/panic.c:688:6: error: no previous prototype for 'warn_slowpath_fmt' [-Werror=missing-prototypes] kernel/panic.c:710:6: error: no previous prototype for '__warn_printk' [-Werror=missing-prototypes] Enclose the definition in the same #ifdef check as the declaration. Signed-off-by: Arnd Bergmann --- kernel/panic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/panic.c b/kernel/panic.c index 886d2ebd0a0d..10effe40a3fa 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -684,6 +684,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint, add_taint(taint, LOCKDEP_STILL_OK); } +#ifdef CONFIG_BUG #ifndef __WARN_FLAGS void warn_slowpath_fmt(const char *file, int line, unsigned taint, const char *fmt, ...) @@ -722,8 +723,6 @@ void __warn_printk(const char *fmt, ...) EXPORT_SYMBOL(__warn_printk); #endif -#ifdef CONFIG_BUG - /* Support resetting WARN*_ONCE state */ static int clear_warn_once_set(void *data, u64 val) From patchwork Wed May 17 13:10:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244898 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 1CEDCC7EE22 for ; Wed, 17 May 2023 13:12:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D6D2280007; Wed, 17 May 2023 09:12:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88732280003; Wed, 17 May 2023 09:12:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74EF9280007; Wed, 17 May 2023 09:12:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 6704F280003 for ; Wed, 17 May 2023 09:12:43 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3D0731205AF for ; Wed, 17 May 2023 13:12:43 +0000 (UTC) X-FDA: 80799786606.29.1BF8232 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id 74A2A140013 for ; Wed, 17 May 2023 13:12:41 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ry4ynhpM; spf=pass (imf09.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=1684329161; 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=ugVHSIxbbEz80CsmENjhpz2ndXoZdPfzjNC7dw0aIWg=; b=VWfloHwK9CfcMlQHBxSJ/w/edG5hJ2viamhtIIsWqEa9H5MT1gKJhExK7eQK6zctkRBeI9 IN8YLb1je8lqdWnL8RN4aYiMVzA/iUDAG/8h/TZfitlFl+rEetjmI/MFRnWmPql3gdLkGj SNXDxSej4pGv+DHs452nZ3+chmZV6O8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329161; a=rsa-sha256; cv=none; b=pjIP8e+FAf/B6M9FlZTAnY43bmlhajd91TJ3Nk1yUA8QyqWCIwa1tv1IcTJiirsf+qIyw+ p2fw3WRkYGUdm9o3St0z5GyOWiOClrBojbqR4pd/vX3k6rXQ53QsOI4Bi6RpWCfIZU2eXq WKBTxttZn1qOJi9PzTlh4xQtWhAh3uY= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ry4ynhpM; spf=pass (imf09.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 8C9236470D; Wed, 17 May 2023 13:12:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C95E2C433A7; Wed, 17 May 2023 13:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329160; bh=d7hci1xlNwrYn7pn2ZxyBhUcLTuHLDJnwYAYODDw+K0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ry4ynhpM0kH4rjI0rh27VkbB9E0CWT+emj5Pf/VEWNSnq4ZNK/M0fPh3cd3q8xggp XRmtMiQP7iAsNbqYWMSUPC8ui7Ko1plq3L731BWwuxTvktD4xwc0Fwm8+ZbdJOinpu E5F+Zt68Uh0ReLFtTc+9w4Sdc36Fa6sO6d1cku2QZJFWlJnDsfIx2on9pHNO6EAyzZ xeqy14d7YG5nUChEEpW0QW2tnXvHSS5RGHByFH3OOuQwyKOcT6RbH/3/530rIYIBOg MWRRI0jMvTIltxR96cvRD26/c3bUU+bo0he6G/0VxA7U/gBKch6tCkyA3fkP+AS0sz 9DLeC9jPuwnpA== 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 08/14] panic: make function declarations visible Date: Wed, 17 May 2023 15:10:56 +0200 Message-Id: <20230517131102.934196-9-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: 74A2A140013 X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: 5yqsun54qzspifkr6mri5nnfbssh618k X-HE-Tag: 1684329161-895320 X-HE-Meta: U2FsdGVkX1++4cCTVzJq4rgBLJisnlXlTfKSLItXbSJXGKCZdJnyUpHHeQcm5h8rNsks+ivPeiOMkje2XmGzoI8HT6JchJ9L+l7UjUj4lXT7ASNOv/3b8TV55V9VjWWJ9jsGqmB4DlVDgkw0M3UFeYEs18c5kakrOWUaVSq772C0JfPmhEfRBIrrnUP9qs6ClgsOc2ZMnGovI0wdQBtcrjY6KboGQjkoXwfA0Pni+/CU8UTuptgtUNFcGOcHDT6vu7h93JFXZ/ZV0MVxVYHBgXwS398H3nqJ8YOcCERIZPigk9TEihvZNSyWzmzCGZ8Xaxm1ezexU/mz+XdG4tQA6Fj4Ft24pJvZoOga0o2bDm9reNtFx/A26UO+G2/3juY/CnW1iem9x/tYvqp6xGzsdDT9u0VTm/c8VPdSgiESOYY6M7lgmU09d9NEKy8DxydyceyMvVaPZnM0svNV4Pwcc/p5BlElZN6Okhvb3dCSVtV0WOKh1iG/rzkjTgi8FM6pjQf3AL8zNUMV9qIfpfvBUL/UdABpVMUfNmzus7JG8GDsMGiqVcCuOnzrIW20icJXN2YAsSyH6cBsQhaFi/WU6WiNoKMCvUIvwQ7Vcr3/lKBdSaub7y/8pdjfMI2/YiXDQ3/KjTgbpLXD0TMvNfmUB3uCeHpQ/SX1o70KrtnK6IKu1yfiO9ehqUci1mUkMCx7U6GVDgSdSuJ7ErSATBiGWEqcAY6FByblWOCfE9ZN4rrx3t9QhNV/DU2iOAoPMaQS4XDsMQ98UXupwu/qmZ90MQA19EpIdf1uxzqiXVu5q3nhW6Q4nMTgC2XiYThSAJJNQCyrzzy45Kb48qwKxixFq6hD0Oku8qV8rR6LBK86j0dXEw7hUkM7oR0RHp3qty3ziamxNZawhYxapv/CJrnQG3xwD9pTCJZp9sTWN6g4ybB4z6KxR1uN1salK+01Zuwiss2IMjZTcg3/x96GzDp ZBeFwVsP fpOJJ+l4GiTCYncIzTX9gRBy6spc3DPfJKIOzsX5nE/qaMto9qT7oi/3Vi3OQ5Dq8PwwPB9l70nu3Wlp2BiyBtsjo/I0TTnRSOboZ1MdgWa79zoGkHBMUC8ADt9yh9On2umyEmIAkXLlnD3f14/ipJSC4OHop1jYmScTIfIRo1Nm3Yq74zY31WYjxZ/FQduZ0wksQPTb7ngOiGOTFJwdlDF4/T3anlxcvzgBh1QQywK3d4NIkIJpdwe2yUqY3y0KzjQ27VIRBNnxJCoDNCFLOrXnMoAupS27OvEv6IiZoPO9sUVCZZE8P4Nm+GePPrjmlMjyS37YFSF3Iul4x1kuVYXUKJinAHDF8mlhX 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 A few panic() related functions have a global definition but not declaration, which causes a warning with W=1: kernel/panic.c:710:6: error: no previous prototype for '__warn_printk' [-Werror=missing-prototypes] kernel/panic.c:756:24: error: no previous prototype for '__stack_chk_fail' [-Werror=missing-prototypes] kernel/exit.c:1917:32: error: no previous prototype for 'abort' [-Werror=missing-prototypes] __warn_printk() is called both as a global function when CONFIG_BUG is enabled, and as a local function in other configs. The other two here are called indirectly from generated or assembler code. Add prototypes for all of these. Signed-off-by: Arnd Bergmann --- include/asm-generic/bug.h | 5 +++-- include/linux/panic.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 4050b191e1a9..6e794420bd39 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -87,10 +87,12 @@ struct bug_entry { * * Use the versions with printk format strings to provide better diagnostics. */ -#ifndef __WARN_FLAGS extern __printf(4, 5) void warn_slowpath_fmt(const char *file, const int line, unsigned taint, const char *fmt, ...); +extern __printf(1, 2) void __warn_printk(const char *fmt, ...); + +#ifndef __WARN_FLAGS #define __WARN() __WARN_printf(TAINT_WARN, NULL) #define __WARN_printf(taint, arg...) do { \ instrumentation_begin(); \ @@ -98,7 +100,6 @@ void warn_slowpath_fmt(const char *file, const int line, unsigned taint, instrumentation_end(); \ } while (0) #else -extern __printf(1, 2) void __warn_printk(const char *fmt, ...); #define __WARN() __WARN_FLAGS(BUGFLAG_TAINT(TAINT_WARN)) #define __WARN_printf(taint, arg...) do { \ instrumentation_begin(); \ diff --git a/include/linux/panic.h b/include/linux/panic.h index 979b776e3bcb..6717b15e798c 100644 --- a/include/linux/panic.h +++ b/include/linux/panic.h @@ -32,6 +32,9 @@ extern int sysctl_panic_on_stackoverflow; extern bool crash_kexec_post_notifiers; +extern void __stack_chk_fail(void); +void abort(void); + /* * panic_cpu is used for synchronizing panic() and crash_kexec() execution. It * holds a CPU number which is executing panic() currently. A value of From patchwork Wed May 17 13:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244899 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 BE066C77B75 for ; Wed, 17 May 2023 13:12:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5A2C5280003; Wed, 17 May 2023 09:12:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 553A1900006; Wed, 17 May 2023 09:12:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 441C3280003; Wed, 17 May 2023 09:12:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 328AF900006 for ; Wed, 17 May 2023 09:12:51 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D04F61A05C1 for ; Wed, 17 May 2023 13:12:50 +0000 (UTC) X-FDA: 80799786900.02.2E62E50 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 108BEA0011 for ; Wed, 17 May 2023 13:12:48 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=niHVPUaD; spf=pass (imf25.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329169; a=rsa-sha256; cv=none; b=1TvM+UmtA4RgxO5q+Zr/Cpw1eEsn6RLZm0jE5hUyDsJhkeZOQQo5RD616gTRxjshaDFag9 RDxaCjSlCdpFm/3E0RWi9DRPEgOq9WyPhpcJGLxP0pH313JR3U52uaqk4oEPSAH2X2b0N/ Bg27dzbYQHh0STbW3nVA5XDrMK4jfEY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=niHVPUaD; spf=pass (imf25.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=1684329169; 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=Wk2Cc5Y19KxG1Txl5+864oAePRxSIC1ST1Y4nfcfiyg=; b=afOwqsOxE22rUGt/7zJEYstLU4lgAz+kABZHMtuy7BbK++lo2X60FSkmpCXVg+EBI3slgZ +if75IqP0HwUYqSz9fVu6tvZtxZ5u1V+H9xT0FbGx2yGlqIDZnC/++/FRdXEudYgXrk+qB FsgGZiiqqFwQnz799jmpnDm2PW/QruU= 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 3108163E73; Wed, 17 May 2023 13:12:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7145AC4331F; Wed, 17 May 2023 13:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329167; bh=GzyYzd/7tEPxQhzzg+PJ/PWcyEzzBXzJLcduAakWhaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=niHVPUaD0YGdt5iRkDpEydf7mr631oogoVQvkL81qpJ5TW0/YDUHFkUu/ZKWJdSyH WVXjhzTUAGxnOs0Vegl0ZmfHCdPZuJ7YUjlFkitUTUNbJVo7lI5FO1LgLzd52JuqCx Wr1JJezEgRxZbp9NdZwExiCGViAREtrVIVavopDauE3wvvOAYNu+BznmFcHd0fJK4u wZIaM4wBxCe+a/H0IRCT0p9ml11d7gsP+vlmdEZuhfHUfwxnHCQLwlRz2WmfAlqtqM +0195gf2dqreO3HDtP8xhqKkWgE47ff7qay5jg24K0FITidNlAbdN4XuegelYOnMhE eS4jr0xmyomCA== 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 09/14] kunit: include debugfs header file Date: Wed, 17 May 2023 15:10:57 +0200 Message-Id: <20230517131102.934196-10-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-Rspam-User: X-Stat-Signature: qcso9fi36emfss1g8c6ptunb3fkg157j X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 108BEA0011 X-HE-Tag: 1684329168-895159 X-HE-Meta: U2FsdGVkX19jhl6N1w5nOLa9JdigIbmCVEpkZQnCAI4a2+uEV/p0vrZOU7lIR+RokLpWr7BvG8DKUCOMURcHngSmLCXgQMcPUXV+KdbtWp8nKf0qbAF3Z6yWyGenSWv7D67aaAcwrUmqEm0TciD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5Hp9Rnu/ZwgpuTVORRpU6bi+k5XgPs5FSk9bOm9EtLlGmXMWHahNf0/Ds32RaaKUyo2vpY8JhJlT9Ln0EsYlBn/glaNR5nZIxgt+PDX9EdV9/1InRdmeuSxMa49W1ikkg0O 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 An extra #include statement is needed to ensure the prototypes for debugfs interfaces are visible, avoiding this warning: lib/kunit/debugfs.c:28:6: error: no previous prototype for 'kunit_debugfs_cleanup' [-Werror=missing-prototypes] lib/kunit/debugfs.c:33:6: error: no previous prototype for 'kunit_debugfs_init' [-Werror=missing-prototypes] lib/kunit/debugfs.c:102:6: error: no previous prototype for 'kunit_debugfs_create_suite' [-Werror=missing-prototypes] lib/kunit/debugfs.c:118:6: error: no previous prototype for 'kunit_debugfs_destroy_suite' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann Reviewed-by: David Gow --- lib/kunit/debugfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c index b08bb1fba106..22c5c496a68f 100644 --- a/lib/kunit/debugfs.c +++ b/lib/kunit/debugfs.c @@ -10,6 +10,7 @@ #include #include "string-stream.h" +#include "debugfs.h" #define KUNIT_DEBUGFS_ROOT "kunit" #define KUNIT_DEBUGFS_RESULTS "results" From patchwork Wed May 17 13:10:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244900 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 56EA2C7EE22 for ; Wed, 17 May 2023 13:12:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA2C8900006; Wed, 17 May 2023 09:12:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E532C900003; Wed, 17 May 2023 09:12:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF3D7900006; Wed, 17 May 2023 09:12:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id C190B900003 for ; Wed, 17 May 2023 09:12:58 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 95F00A05D0 for ; Wed, 17 May 2023 13:12:58 +0000 (UTC) X-FDA: 80799787236.26.5E8154D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id CC7DBC001A for ; Wed, 17 May 2023 13:12:56 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=a5AKMGQ6; spf=pass (imf10.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=1684329176; 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=Cq55/MXns8hT3gNsC5t1/n6uO4XxgJSkImcx4nzo/vI=; b=dRUDseaBpRAAdnyrCuRWhY22MTcXey6O5GRPEV/fbYWSjZ2nKGFKu95rM38P+wBjbQFz2g h+b9lcpxsVRCTq7w04AS5R1gpeikG4q2Ybih9APf9eh/C9Z7EROZOU1q6cjL5J121VeTaC npxyjMGycnx2WghR8tkYUhdqf1ujJKs= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=a5AKMGQ6; spf=pass (imf10.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329176; a=rsa-sha256; cv=none; b=qt+G8JJXZu8ltmfabX3n2Y/NFI1dZ0Eju0UB5kuYrE8p2KVaE0mz/6Qg01ZUvkFD4kJpCN MityGeuAt5076zgR3T4Nj2nr08G7RBzKsv6qWwoR8EiGsSy/i6tUasC3nbMSdY5zpNuosh DtKiNdj09JFqNCbjDtey9lz/eMpbirU= 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 E097A64719; Wed, 17 May 2023 13:12:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AC7AC433A1; Wed, 17 May 2023 13:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329175; bh=jyfIU4kb2iohIZExECeJDgccrpywO2d4N5RO4/Lz9/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a5AKMGQ6H8c4SmWJA9acjTbaFCzZ0AA2wm05BPlzt7RdfOUiogdQAYWE+G+NGcZdX yDjsODiNdpDTqKlvtQXPCuaGA3VC6/f234nMehw9xGV/czmg096DJmqiZsDf12qqFe ej546ikNtCrc67wnEUFw1c3f59H4n265vxwBWYFw7f1ACFpU/dNvgnfSCj3KARvmhc okU5JO6mfHibgPJap1ViK2c3byQdkDKbjHgzIgRlSYBev2T0JJyKlGkP2OUNIdoni8 hQe43lij086yvsSwf3Lz908iMLuTejdjlTVVg35FM3ecRVrHkCom9/KKxw7ZIB2uTs DJJKGGvs0X6mw== 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 10/14] suspend: add a arch_resume_nosmt() prototype Date: Wed, 17 May 2023 15:10:58 +0200 Message-Id: <20230517131102.934196-11-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-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CC7DBC001A X-Stat-Signature: dor4b5z11ehao6oye89portxrj1zmn4x X-HE-Tag: 1684329176-166500 X-HE-Meta: U2FsdGVkX193/0KPx0GPfMJbM5j45Xhldc1HVUP+u7RgyMhBW5v6VhflU4GJSZ7YmIeRYA684POy1NsLbZwNI5zgMWWdncLJ9wnQKyGgVgAj0OTE8lqIZZDPfUM4fFaGGCyTXJ6nSZP5CZcWNGVCPBSBSSeh3/NTfeRgvCwTpM0Pro84VtIQX4I+OoPp3yx4od/I0DyCG71QJbNoI7DcSsJKqa4xzolfxfGc0ZPHWtgO2QJSBg7LztS+L2MFvmF0QnEZB6Wi/l8quNLjWfu1kFtoz2Xy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xYtROb0PJClyyM= 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 arch_resume_nosmt() has a __weak definition, plus an x86 specific override, but no prototype that ensures the two have the same arguments. This causes a W=1 warning: arch/x86/power/hibernate.c:189:5: error: no previous prototype for 'arch_resume_nosmt' [-Werror=missing-prototypes] Add the prototype in linux/suspend.h, which is included in both places. Signed-off-by: Arnd Bergmann Acked-by: Rafael J. Wysocki --- include/linux/suspend.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index f16653f7be32..bc911fecb8e8 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -472,6 +472,8 @@ static inline int hibernate_quiet_exec(int (*func)(void *data), void *data) { } #endif /* CONFIG_HIBERNATION */ +int arch_resume_nosmt(void); + #ifdef CONFIG_HIBERNATION_SNAPSHOT_DEV int is_hibernate_resume_dev(dev_t dev); #else From patchwork Wed May 17 13:10:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244901 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 7F8EDC7EE2E for ; Wed, 17 May 2023 13:13:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 24676280001; Wed, 17 May 2023 09:13:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F6F5900003; Wed, 17 May 2023 09:13:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07137280001; Wed, 17 May 2023 09:13:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EAB28900003 for ; Wed, 17 May 2023 09:13:06 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B871B80566 for ; Wed, 17 May 2023 13:13:06 +0000 (UTC) X-FDA: 80799787572.26.61927C3 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id C392214000B for ; Wed, 17 May 2023 13:13:04 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=l8Upc9il; spf=pass (imf09.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=1684329184; 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=+Uz7nOEDaZ/7aHBCZS8V6Mv7n+VHVKoRRUtD9ZZK0h0=; b=s9UjWUL5C09d5aujhOXB5re3phvwXFzTkiMsvak0c0drN9/6LIrxW+aUw6T53vHjT/Rhat l49H6QGLd393Frwn7pbESu1R3nnsswTytcwRnNNX0OF3h0PCH/3QIzdBBrTSS/yo829EOG v9iOa6BL/BfafidUXGiqtAl5Atrq7I0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329184; a=rsa-sha256; cv=none; b=5rUhuM1IdSK0WVq/nCbn7DTWzy6qfuQT7+lhOT5wo+Jd2v2vcxWHoGKNHhJUsV/PbuzEdB h8WLWzS2Z13dzKEXbc2vWRxjNZLaSv75jz8MdyH5fyRckeNPndhHhy+24BnmhtmQU8tmKV Bnr0A/yBC0EACe9xqZoGiSvejBA9pso= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=l8Upc9il; spf=pass (imf09.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 9E9966471D; Wed, 17 May 2023 13:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C74F6C433A4; Wed, 17 May 2023 13:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329183; bh=5NC+R9L1E/fmBQ066aYfhi0qkrJ6JzVzgVjmEHMkLjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l8Upc9ileCnKM5gWLC5icoFUzHvjtfIb0rGQuYHK2R2BBoJn3EQUN8YGxQGUmTe1Q FifVbqnrxjcKrhIPG7cfxaO7G4kNVGuqhVVgPLyBAydYBADy08TrBam1s98AjZ3ZkE fEnaLhk/IvZkBjNkmt3jxoFlfX2LU4F+95jXsqagxUboJmuWOZJNNv1jdEHE1lr3u3 s+xcsbofGAKuaoNyi4GCmd9IIZYTJX4PYJbEOaUwa4IbTX4pzj82XZ+dIN+t3R5sOK V2OrXFjNelWdB9lEoKDuGA5pIqfrei8Z05wavf5Tyw/7qlaF5Wje21GVRxVY4Jyrxt HyNYPjbLmWSMQ== 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 11/14] init: consolidate prototypes in linux/init.h Date: Wed, 17 May 2023 15:10:59 +0200 Message-Id: <20230517131102.934196-12-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: C392214000B X-Stat-Signature: fy8afkz4jmziggu8ott68c47qrx54x64 X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1684329184-827874 X-HE-Meta: U2FsdGVkX1+TMlDNzNUBsMXt+Jp1cJQwH4h+m50Wqfn69vH79xkuzGSfvT5EIUCvMzNNS2oexGnRJBN64DObwunj+TEHajw/YxTxsKEMuO2QiBCs9LQmn1i/bzGOKIVd2Dgyhz8Va9IftN27I11iRWHKIg7ZCMKdtX53cgymimHWd2WAYFZBxhiKUzoCyl/AkjCXn6H+eJWZWnm3tOoAc5zxR20asFrDc0i8H5g08pS89kvbt4WVbbPwWhiFNKh1iKjjVCYoh0mmHB+I6vNvJkBx9QFR6hftBX7qeWlwpjJNpaP5H2WzrneQxmxRlgcyHAQPDrcLFm0SMvtEtjaEIATBAtLwxLFm1FEp29mmkFUI7qRFrC7WaIF2+kEGUo2rExGglqaTbhwkVCNdMwTPXVvvftPfP3lXCXeOpogZCEJ2htBxtxFUJgU23RPmLWbnQZAuOOglZbfCz0kMM+bN7Vp7TqXC8rFQfrybCuoSH3a3PpWDhRAY9escUfGjJmcLSClpghimfGiG02i7RkntEdIoRW660rgPx523VfcLiOpt1aSTHLJYeVJn/mpEQY74nfBmP0ri9Gvjoqat2gQ0q3cjCgpMNcbN1vkLNNB0rIjcgaYEYOu+BSIckNXG9RBqYkRYwwClaFgL4vg1zt498zNZ/5VMUgUZ35rlUg2dFu7E1Fgo/gU4T6+ReFY0C0jh5Zbf3cZddHleLnv3S7JCXmt7FIc5hmienMXxc273Dh/BF5ALsaSWjXstPszMsotIpBQV0HWVLrzffkIBQ2l8lg3TfIbv5FNznFIISMG2RgH75NwAg6v+bxwwjgvbJusRRoqR1k+vqNW198OUWc/M5ZoT9TUabj/nczLXnlsikeaUCO5uHUeRz8x3nL/su80qN35HiJ7gfDgM0nBzmZ6Nz37+d5UOD19RuEFKcUJO/5rcPGAgemQgam4tdpCnZXKxCIkA5rKlEY5EBj+Kgg1 1utRD5LX fMqRuAcWeL0F7U3JklMooi+nCDitFjleDJ9pKcK/7HflNznpBJMO01vceu6Nkq3gBPmlZTjB2MLrIJBnONy1SES3NDNjglF8YB4IxqFW0IiaqCwQn+5uJqWNwQ3cGD9z7XvIbt7R6a8LNAfiV8rCqHKYD7wAIwBXkEPOcq6GmXxT4pJSf40fKqVP6ioeeZqsMCpXcW924mST7Py5bvSt30VHxE7Yd/GENWUar57zedYY+WH2IOq3SqxF9bTWNmi1Z9RzgXCnGae7iAhULCzFk+CUswAdUcMLcU/JeDls3EyL3SPddnba9+0Jj16Nt9gdkOPlV57AqJvF5H0VYlYttq0jhKkqKn1Hudzuc 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 init/main.c file contains some extern declarations for functions defined in architecture code, and it defines some other functions that are called from architecture code with a custom prototype. Both of those result in warnings with 'make W=1': init/calibrate.c:261:37: error: no previous prototype for 'calibrate_delay_is_known' [-Werror=missing-prototypes] init/main.c:790:20: error: no previous prototype for 'mem_encrypt_init' [-Werror=missing-prototypes] init/main.c:792:20: error: no previous prototype for 'poking_init' [-Werror=missing-prototypes] arch/arm64/kernel/irq.c:122:13: error: no previous prototype for 'init_IRQ' [-Werror=missing-prototypes] arch/arm64/kernel/time.c:55:13: error: no previous prototype for 'time_init' [-Werror=missing-prototypes] arch/x86/kernel/process.c:935:13: error: no previous prototype for 'arch_post_acpi_subsys_init' [-Werror=missing-prototypes] init/calibrate.c:261:37: error: no previous prototype for 'calibrate_delay_is_known' [-Werror=missing-prototypes] kernel/fork.c:991:20: error: no previous prototype for 'arch_task_cache_init' [-Werror=missing-prototypes] Add prototypes for all of these in include/linux/init.h or another appropriate header, and remove the duplicate declarations from architecture specific code. Signed-off-by: Arnd Bergmann Reviewed-by: Palmer Dabbelt # RISC-V Acked-by: Palmer Dabbelt # RISC-V --- arch/arm/include/asm/irq.h | 1 - arch/microblaze/include/asm/setup.h | 2 -- arch/mips/include/asm/irq.h | 1 - arch/parisc/kernel/smp.c | 1 - arch/powerpc/include/asm/irq.h | 1 - arch/riscv/include/asm/irq.h | 2 -- arch/riscv/include/asm/timex.h | 2 -- arch/s390/kernel/entry.h | 2 -- arch/sh/include/asm/irq.h | 1 - arch/sh/include/asm/rtc.h | 2 -- arch/sparc/include/asm/irq_32.h | 1 - arch/sparc/include/asm/irq_64.h | 1 - arch/sparc/include/asm/timer_64.h | 1 - arch/sparc/kernel/kernel.h | 4 ---- arch/x86/include/asm/irq.h | 2 -- arch/x86/include/asm/mem_encrypt.h | 3 --- arch/x86/include/asm/time.h | 1 - arch/x86/include/asm/tsc.h | 1 - include/linux/acpi.h | 3 ++- include/linux/delay.h | 1 + include/linux/init.h | 20 ++++++++++++++++++++ init/main.c | 18 ------------------ 22 files changed, 23 insertions(+), 48 deletions(-) diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index f62fa9f36192..ea0fdf83c397 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h @@ -23,7 +23,6 @@ #endif #ifndef __ASSEMBLY__ -void init_IRQ(void); #ifdef CONFIG_SMP #include diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h index a06cc1f97aa9..3657f5e78a3d 100644 --- a/arch/microblaze/include/asm/setup.h +++ b/arch/microblaze/include/asm/setup.h @@ -16,8 +16,6 @@ extern char *klimit; extern void mmu_reset(void); -void time_init(void); -void init_IRQ(void); void machine_early_init(const char *cmdline, unsigned int ram, unsigned int fdt, unsigned int msr, unsigned int tlb0, unsigned int tlb1); diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h index 44f9824c1d8c..75abfa834ab7 100644 --- a/arch/mips/include/asm/irq.h +++ b/arch/mips/include/asm/irq.h @@ -19,7 +19,6 @@ #define IRQ_STACK_SIZE THREAD_SIZE #define IRQ_STACK_START (IRQ_STACK_SIZE - 16) -extern void __init init_IRQ(void); extern void *irq_stack[NR_CPUS]; /* diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index b7fc859fa87d..83348125b524 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -271,7 +271,6 @@ void arch_send_call_function_single_ipi(int cpu) static void smp_cpu_init(int cpunum) { - extern void init_IRQ(void); /* arch/parisc/kernel/irq.c */ extern void start_cpu_itimer(void); /* arch/parisc/kernel/time.c */ /* Set modes and Enable floating point coprocessor */ diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h index deadd2149426..94dffa1dd223 100644 --- a/arch/powerpc/include/asm/irq.h +++ b/arch/powerpc/include/asm/irq.h @@ -50,7 +50,6 @@ extern void *hardirq_ctx[NR_CPUS]; extern void *softirq_ctx[NR_CPUS]; void __do_IRQ(struct pt_regs *regs); -extern void __init init_IRQ(void); int irq_choose_cpu(const struct cpumask *mask); diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 43b9ebfbd943..8e10a94430a2 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -16,6 +16,4 @@ void riscv_set_intc_hwnode_fn(struct fwnode_handle *(*fn)(void)); struct fwnode_handle *riscv_get_intc_hwnode(void); -extern void __init init_IRQ(void); - #endif /* _ASM_RISCV_IRQ_H */ diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h index d6a7428f6248..a06697846e69 100644 --- a/arch/riscv/include/asm/timex.h +++ b/arch/riscv/include/asm/timex.h @@ -88,6 +88,4 @@ static inline int read_current_timer(unsigned long *timer_val) return 0; } -extern void time_init(void); - #endif /* _ASM_RISCV_TIMEX_H */ diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index 34674e38826b..9f41853f36b9 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h @@ -34,14 +34,12 @@ void kernel_stack_overflow(struct pt_regs * regs); void handle_signal32(struct ksignal *ksig, sigset_t *oldset, struct pt_regs *regs); -void __init init_IRQ(void); void do_io_irq(struct pt_regs *regs); void do_ext_irq(struct pt_regs *regs); void do_restart(void *arg); void __init startup_init(void); void die(struct pt_regs *regs, const char *str); int setup_profiling_timer(unsigned int multiplier); -void __init time_init(void); unsigned long prepare_ftrace_return(unsigned long parent, unsigned long sp, unsigned long ip); struct s390_mmap_arg_struct; diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index 1c4923502fd4..0f384b1f45ca 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h @@ -22,7 +22,6 @@ extern unsigned short *irq_mask_register; /* * PINT IRQs */ -void init_IRQ_pint(void); void make_imask_irq(unsigned int irq); static inline int generic_irq_demux(int irq) diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index 2d333ad60810..40b0899783d7 100644 --- a/arch/sh/include/asm/rtc.h +++ b/arch/sh/include/asm/rtc.h @@ -2,8 +2,6 @@ #ifndef _ASM_RTC_H #define _ASM_RTC_H -void time_init(void); - #define RTC_CAP_4_DIGIT_YEAR (1 << 0) struct sh_rtc_platform_data { diff --git a/arch/sparc/include/asm/irq_32.h b/arch/sparc/include/asm/irq_32.h index 43ec2609b811..6ee48321cbc2 100644 --- a/arch/sparc/include/asm/irq_32.h +++ b/arch/sparc/include/asm/irq_32.h @@ -17,7 +17,6 @@ #define irq_canonicalize(irq) (irq) -void __init init_IRQ(void); void __init sun4d_init_sbi_irq(void); #define NO_IRQ 0xffffffff diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 154df2cf19f4..b436029f1ced 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h @@ -61,7 +61,6 @@ void sun4u_destroy_msi(unsigned int irq); unsigned int irq_alloc(unsigned int dev_handle, unsigned int dev_ino); void irq_free(unsigned int irq); -void __init init_IRQ(void); void fixup_irqs(void); static inline void set_softint(unsigned long bits) diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h index dcfad4613e18..ffff52c8b760 100644 --- a/arch/sparc/include/asm/timer_64.h +++ b/arch/sparc/include/asm/timer_64.h @@ -34,7 +34,6 @@ extern struct sparc64_tick_ops *tick_ops; unsigned long sparc64_get_clock_tick(unsigned int cpu); void setup_sparc64_timer(void); -void __init time_init(void); #define TICK_PRIV_BIT BIT(63) #define TICKCMP_IRQ_BIT BIT(63) diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 9cd09a3ef35f..970ef8dec86e 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h @@ -62,9 +62,6 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs); void do_signal32(struct pt_regs * regs); asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); -/* time_64.c */ -void __init time_init_early(void); - /* compat_audit.c */ extern unsigned int sparc32_dir_class[]; extern unsigned int sparc32_chattr_class[]; @@ -91,7 +88,6 @@ extern int static_irq_count; extern spinlock_t irq_action_lock; void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); -void init_IRQ(void); /* sun4m_irq.c */ void sun4m_init_IRQ(void); diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index 768aa234cbb4..29e083b92813 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h @@ -40,8 +40,6 @@ extern void __handle_irq(struct irq_desc *desc, struct pt_regs *regs); extern void init_ISA_irqs(void); -extern void __init init_IRQ(void); - #ifdef CONFIG_X86_LOCAL_APIC void arch_trigger_cpumask_backtrace(const struct cpumask *mask, bool exclude_self); diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index b7126701574c..1c22c86d13e6 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -87,9 +87,6 @@ static inline void mem_encrypt_free_decrypted_mem(void) { } #endif /* CONFIG_AMD_MEM_ENCRYPT */ -/* Architecture __weak replacement functions */ -void __init mem_encrypt_init(void); - void add_encrypt_protection_map(void); /* diff --git a/arch/x86/include/asm/time.h b/arch/x86/include/asm/time.h index a53961c64a56..f360104ed172 100644 --- a/arch/x86/include/asm/time.h +++ b/arch/x86/include/asm/time.h @@ -6,7 +6,6 @@ #include extern void hpet_time_init(void); -extern void time_init(void); extern bool pit_timer_init(void); extern bool tsc_clocksource_watchdog_disabled(void); diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index fbdc3d951494..1992ef5e41a9 100644 --- a/arch/x86/include/asm/tsc.h +++ b/arch/x86/include/asm/tsc.h @@ -32,7 +32,6 @@ extern struct system_counterval_t convert_art_ns_to_tsc(u64 art_ns); extern void tsc_early_init(void); extern void tsc_init(void); -extern unsigned long calibrate_delay_is_known(void); extern void mark_tsc_unstable(char *reason); extern int unsynchronized_tsc(void); extern int check_tsc_unstable(void); diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 7b71dd74baeb..f4c2a87d02c1 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -712,7 +712,6 @@ int acpi_match_platform_list(const struct acpi_platform_list *plat); extern void acpi_early_init(void); extern void acpi_subsystem_init(void); -extern void arch_post_acpi_subsys_init(void); extern int acpi_nvs_register(__u64 start, __u64 size); @@ -1084,6 +1083,8 @@ static inline bool acpi_sleep_state_supported(u8 sleep_state) #endif /* !CONFIG_ACPI */ +extern void arch_post_acpi_subsys_init(void); + #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC int acpi_ioapic_add(acpi_handle root); #else diff --git a/include/linux/delay.h b/include/linux/delay.h index 039e7e0c7378..ff9cda975e30 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -56,6 +56,7 @@ static inline void ndelay(unsigned long x) extern unsigned long lpj_fine; void calibrate_delay(void); +unsigned long calibrate_delay_is_known(void); void __attribute__((weak)) calibration_delay_done(void); void msleep(unsigned int msecs); unsigned long msleep_interruptible(unsigned int msecs); diff --git a/include/linux/init.h b/include/linux/init.h index c5fe6d26f5b1..1200fa99e848 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -152,6 +152,24 @@ extern unsigned int reset_devices; void setup_arch(char **); void prepare_namespace(void); void __init init_rootfs(void); + +void init_IRQ(void); +void time_init(void); +void mem_encrypt_init(void); +void poking_init(void); +void pgtable_cache_init(void); + +extern initcall_entry_t __initcall_start[]; +extern initcall_entry_t __initcall0_start[]; +extern initcall_entry_t __initcall1_start[]; +extern initcall_entry_t __initcall2_start[]; +extern initcall_entry_t __initcall3_start[]; +extern initcall_entry_t __initcall4_start[]; +extern initcall_entry_t __initcall5_start[]; +extern initcall_entry_t __initcall6_start[]; +extern initcall_entry_t __initcall7_start[]; +extern initcall_entry_t __initcall_end[]; + extern struct file_system_type rootfs_fs_type; #if defined(CONFIG_STRICT_KERNEL_RWX) || defined(CONFIG_STRICT_MODULE_RWX) @@ -309,6 +327,8 @@ struct obs_kernel_param { int early; }; +extern const struct obs_kernel_param __setup_start[], __setup_end[]; + /* * Only for really core code. See moduleparam.h for the normal way. * diff --git a/init/main.c b/init/main.c index af50044deed5..d4400efbef0a 100644 --- a/init/main.c +++ b/init/main.c @@ -115,10 +115,6 @@ static int kernel_init(void *); -extern void init_IRQ(void); -extern void radix_tree_init(void); -extern void maple_tree_init(void); - /* * Debug helper: via this flag we know that we are in 'early bootup code' * where only the boot processor is running with IRQ disabled. This means @@ -137,7 +133,6 @@ EXPORT_SYMBOL(system_state); #define MAX_INIT_ARGS CONFIG_INIT_ENV_ARG_LIMIT #define MAX_INIT_ENVS CONFIG_INIT_ENV_ARG_LIMIT -extern void time_init(void); /* Default late time init is NULL. archs can override this later. */ void (*__initdata late_time_init)(void); @@ -196,8 +191,6 @@ static const char *argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; const char *envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; static const char *panic_later, *panic_param; -extern const struct obs_kernel_param __setup_start[], __setup_end[]; - static bool __init obsolete_checksetup(char *line) { const struct obs_kernel_param *p; @@ -1263,17 +1256,6 @@ int __init_or_module do_one_initcall(initcall_t fn) } -extern initcall_entry_t __initcall_start[]; -extern initcall_entry_t __initcall0_start[]; -extern initcall_entry_t __initcall1_start[]; -extern initcall_entry_t __initcall2_start[]; -extern initcall_entry_t __initcall3_start[]; -extern initcall_entry_t __initcall4_start[]; -extern initcall_entry_t __initcall5_start[]; -extern initcall_entry_t __initcall6_start[]; -extern initcall_entry_t __initcall7_start[]; -extern initcall_entry_t __initcall_end[]; - static initcall_entry_t *initcall_levels[] __initdata = { __initcall0_start, __initcall1_start, From patchwork Wed May 17 13:11:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244902 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 6FFFBC77B7F for ; Wed, 17 May 2023 13:13:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09950280002; Wed, 17 May 2023 09:13:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 04968900003; Wed, 17 May 2023 09:13:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5403280002; Wed, 17 May 2023 09:13:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D777E900003 for ; Wed, 17 May 2023 09:13:13 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B003416057F for ; Wed, 17 May 2023 13:13:13 +0000 (UTC) X-FDA: 80799787866.08.542ACAC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id B8980A000F for ; Wed, 17 May 2023 13:13:11 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=D1+6zXZH; spf=pass (imf25.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=1684329191; 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=3sSHNXtlfuNU1od92qd1KeO5qLCYolRFHEfi89lB+uc=; b=NcqJNvBVkGK5cEmFMOzjkkoACvUwxOxxY3hP9QnjDP6JYT9RMoZvMsjh6uf3Q1d5bFgvB7 byHpgXYpWYyrswjzeSlKed/jwh97zgKX0cuLZpDpiikHz6zupyQX1GEEm/5DVFPVTDVAZ9 tstAkteiRgHDadL53kYoGfP+k2Ylsq0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329191; a=rsa-sha256; cv=none; b=UYrikqY6bxWGCQIqitn6XCwWiUhP3BJFa4T7cBQPtpoVEXkw/B4GOiG3XTqRxSvYc5Hve1 2PpEMKQUvH0vH9qP8y4AK9FZuJbrDdQ6skJr3bAj99xg5NMCsq/GI2Hmmdf5+eMZGKUX5m G8U9jxwW7HmifZuDssN+n5nFRtuHwSY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=D1+6zXZH; spf=pass (imf25.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 E6D6D642BB; Wed, 17 May 2023 13:13:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82ACBC433A1; Wed, 17 May 2023 13:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329190; bh=d19FT2UXzed3oRWIfJJFjSTk/2JiLUfj9No4RlO7/6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1+6zXZHFnxnG+wOAs+I7Jk3ZmwjP67pJgzP0uRLk1KweQErWDtrD6kcCaiJbOcnT FeyForINJFNNHVR7SlZDLxBqXsy6U1Q8QSU2g7HzT+HDxANY+2tRRB/juS7IWqHnN0 R7uJEX9uIR2BJ1iVGwpgqVvJxOimPbuxDH8nVE33oigOLH+a2C6WGLVT5O2FBvlKz1 1cchN4Ol9FfjcJdHRvb6NG6ME/EGUJBb5JSRXXIOYIHDL60v7knAjAptFgq2qEdzKr kBNHvdOcis7Z2szvD6pixKpaEvKxiNP2G0OykAdHnW8HCBkYh+jiZUMYx1rLc8DsBc EwxZhq5xDzb7g== 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 12/14] init: move cifs_root_data() prototype into linux/mount.h Date: Wed, 17 May 2023 15:11:00 +0200 Message-Id: <20230517131102.934196-13-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-Stat-Signature: n49cdeb7difbcou1ni57oz8mgctkrrj3 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B8980A000F X-Rspam-User: X-HE-Tag: 1684329191-216295 X-HE-Meta: U2FsdGVkX1/mOlcHnKuAczeKErkVhDC9tpr4nRzSTCQRpO4HBrcXnFgHDsYE8wnIDWX7F7Dn7xbqJWqrdwszlJStDl/WQbSyET1FkS5RH/bOSnV68ypnyoGl+s0LYkPzeENZrdokdvt5IYQUP2l1V7fS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+YbvwfxAcsm5rcFcjQ315hEVeqq0apP2n84H/UaYR8YmXI/b2eQW3LdB+oAbJFgS076uooOdcdjHAyUUDuTj0ktmr/bS0AwgGLUn0FK4Q6dTTJTFgkuk5PTSpQNIAFqQO4HJW3cCiA8Y6BypJdPjS0= 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 cifs_root_data() is defined in cifs and called from early init code, but lacks a global prototype: fs/cifs/cifsroot.c:83:12: error: no previous prototype for 'cifs_root_data' Move the declaration from do_mounts.c into an appropriate header. Signed-off-by: Arnd Bergmann --- include/linux/mount.h | 2 ++ init/do_mounts.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mount.h b/include/linux/mount.h index 1ea326c368f7..f381eb44b24c 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -124,4 +124,6 @@ extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, struct vfsmount *); extern void kern_unmount_array(struct vfsmount *mnt[], unsigned int num); +extern int cifs_root_data(char **dev, char **opts); + #endif /* _LINUX_MOUNT_H */ diff --git a/init/do_mounts.c b/init/do_mounts.c index 811e94daf0a8..83447c46ad6d 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -489,8 +489,6 @@ static int __init mount_nfs_root(void) #ifdef CONFIG_CIFS_ROOT -extern int cifs_root_data(char **dev, char **opts); - #define CIFSROOT_TIMEOUT_MIN 5 #define CIFSROOT_TIMEOUT_MAX 30 #define CIFSROOT_RETRY_MAX 5 From patchwork Wed May 17 13:11:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244903 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 DE2DBC7EE2F for ; Wed, 17 May 2023 13:13:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 72A27280005; Wed, 17 May 2023 09:13:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D96A900003; Wed, 17 May 2023 09:13:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5A190280005; Wed, 17 May 2023 09:13:22 -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 4B391900003 for ; Wed, 17 May 2023 09:13:22 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 1738F1C7375 for ; Wed, 17 May 2023 13:13:22 +0000 (UTC) X-FDA: 80799788244.17.E442C5F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf21.hostedemail.com (Postfix) with ESMTP id EE7841C0011 for ; Wed, 17 May 2023 13:13:19 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KZhlxehR; spf=pass (imf21.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=1684329200; 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=zJrxNjMRYWYphQhJfEtyNbVpJX9ShoonVG9VITyf/oc=; b=JRNeYj8O64pOgDRIiJkRSobFRtJun2ieiRVo8fq2AKwzg52pJ/Sjh1SgFHkPSSrP/sTDWJ s6KLVK4LW2XIFJxX7OtKeIaOh39EFcJ6xxCKBWTYbM9ES0StNwJcB8CUFWUYorEj366Hms CikRbiFYwU9Edt5uNyBFk+/jnnFeqS8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329200; a=rsa-sha256; cv=none; b=ONl3MhY4ztarbtSYb8vNjr3d5CZXbb0RzBfl2NLSknFChK9HuvI0Z4x5HXP7qE/+i6CGZN SlZ+bLat8sTR9pnSwRLe6FInD5C7v49Fm74c5METDR3gjGNvHjcvOg7pjSl+eOuzp0GP8H tksor7WzfQwTDE+XWyry4v4WnF4rrWk= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=KZhlxehR; spf=pass (imf21.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 0C39F63EF0; Wed, 17 May 2023 13:13:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A0DAC433D2; Wed, 17 May 2023 13:13:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329198; bh=tA8vDceOtwnaYEmuvRonEkfnHU5EgkwYZJxxRjDBrtY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZhlxehR2rDeiAnVDqzTiOa3ksnRODBJzi001SQy9km83BCh+sSslpUVguoSeN8Il uwXHjW+IYnLrcNsvGw9/vc5PlLdSb4Gcq8SNGb+9U7jqrv+4zSwUd9/9bPNimcMQok LPjRXrVXwWwUwdDMoTBXVMqAwdmMv0pYUVWZ/lWbR3Sum2O620By8zNUB4CsRzRnGT B8+bZt42Vt5lZ795+/xA9/1lKx/j2eJjWnya+dwVW+/eXJBG2ACQBiEl2QIn7S24uR aIHSN8P8r0X9oWG4waSTw5ry47uHOhsMogxlxAjjiT3E57B6sfhCFfCGfKcQYgqDcQ jSutqMkSXP8Ng== 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 13/14] thread_info: move function declarations to linux/thread_info.h Date: Wed, 17 May 2023 15:11:01 +0200 Message-Id: <20230517131102.934196-14-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-Stat-Signature: yqpawy8t53hkb5moned5s9tuqonhgqfb X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EE7841C0011 X-Rspam-User: X-HE-Tag: 1684329199-38854 X-HE-Meta: U2FsdGVkX1/60URfPdvEWE8W92anqTgfLxTv6TuXICddGlKjLVnoG+o+JK6ibKmgqkRfoRfok4YwH2THQ6euz0iZv3M7Ar8GVX1NlbocedQxSyOkMLN4V/hEVun1M4UejRUouKplZUVyRZv2PIxQ31eWhVooiTGTc5Pg01dxGKRpB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CJH9XCLG65LEvBB6UqdhtMpxD6fiuB5IIWpIFp4GHK7ilkpSwRG1/fStONtcKf90elozQ6eRqhpW3pbR5AZHXfEoJMuruDKBdhptVMngzhMgOz9zjM99eIaGJg+8bj0= 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 There are a few __weak functions in kernel/fork.c, which architectures can override. If there is no prototype, the compiler warns about them: kernel/fork.c:164:13: error: no previous prototype for 'arch_release_task_struct' [-Werror=missing-prototypes] kernel/fork.c:991:20: error: no previous prototype for 'arch_task_cache_init' [-Werror=missing-prototypes] kernel/fork.c:1086:12: error: no previous prototype for 'arch_dup_task_struct' [-Werror=missing-prototypes] There are already prototypes in a number of architecture specific headers that have addressed those warnings before, but it's much better to have these in a single place so the warning no longer shows up anywhere. Signed-off-by: Arnd Bergmann Acked-by: Catalin Marinas --- arch/arm64/include/asm/thread_info.h | 4 ---- arch/s390/include/asm/thread_info.h | 3 --- arch/sh/include/asm/thread_info.h | 3 --- arch/x86/include/asm/thread_info.h | 3 --- include/linux/thread_info.h | 5 +++++ 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 848739c15de8..553d1bc559c6 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -55,10 +55,6 @@ struct thread_info { void arch_setup_new_exec(void); #define arch_setup_new_exec arch_setup_new_exec -void arch_release_task_struct(struct task_struct *tsk); -int arch_dup_task_struct(struct task_struct *dst, - struct task_struct *src); - #endif #define TIF_SIGPENDING 0 /* signal pending */ diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index c7c97921ed8d..a674c7d25da5 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h @@ -52,9 +52,6 @@ struct thread_info { struct task_struct; -void arch_release_task_struct(struct task_struct *tsk); -int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); - void arch_setup_new_exec(void); #define arch_setup_new_exec arch_setup_new_exec diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index 1400fbb8b423..9f19a682d315 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h @@ -84,9 +84,6 @@ static inline struct thread_info *current_thread_info(void) #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) -extern void arch_task_cache_init(void); -extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); -extern void arch_release_task_struct(struct task_struct *tsk); extern void init_thread_xstate(void); #endif /* __ASSEMBLY__ */ diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index f1cccba52eb9..d63b02940747 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -232,9 +232,6 @@ static inline int arch_within_stack_frames(const void * const stack, current_thread_info()->status & TS_COMPAT) #endif -extern void arch_task_cache_init(void); -extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); -extern void arch_release_task_struct(struct task_struct *tsk); extern void arch_setup_new_exec(void); #define arch_setup_new_exec arch_setup_new_exec #endif /* !__ASSEMBLY__ */ diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index c02646884fa8..9ea0b28068f4 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -256,6 +256,11 @@ check_copy_size(const void *addr, size_t bytes, bool is_source) static inline void arch_setup_new_exec(void) { } #endif +void arch_task_cache_init(void); /* for CONFIG_SH */ +void arch_release_task_struct(struct task_struct *tsk); +int arch_dup_task_struct(struct task_struct *dst, + struct task_struct *src); + #endif /* __KERNEL__ */ #endif /* _LINUX_THREAD_INFO_H */ From patchwork Wed May 17 13:11:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13244904 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 3F73CC77B75 for ; Wed, 17 May 2023 13:13:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF51C900003; Wed, 17 May 2023 09:13:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA5DA280006; Wed, 17 May 2023 09:13:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6DD1900007; Wed, 17 May 2023 09:13:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AA1D4900003 for ; Wed, 17 May 2023 09:13:29 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 557F812053F for ; Wed, 17 May 2023 13:13:29 +0000 (UTC) X-FDA: 80799788538.02.A8445DC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id 7D74440014 for ; Wed, 17 May 2023 13:13:27 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sUL++CNi; spf=pass (imf27.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=1684329207; 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=GVfsbqLiF9i79x+pHeUZZ1ybbBkINPX5Op88jIPkJDY=; b=8V9ld5eFDaGJ0JyvtpRDp7qrd1FMXNLN3yP7y/rHZ21lRlSZEU4iR+bgict79AfL1QWoGS bqzuo5GVoxNSrvNWxJtGQuMg4DuobfzLibDZMpPp4rXXPSsNGomvC+DGDJH1C0tRh1dRHg c5VufQfy3zQi2yRee3Ke1TZPf2MkP0o= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sUL++CNi; spf=pass (imf27.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684329207; a=rsa-sha256; cv=none; b=V3qmwC2AEDmycF9FUqRl2yke5K/bWf0DICol7kc0B3jZinP+vo0fPO4GpdWNEhcuvZWGUA DAX+C0EsRlMA7aSzNHviyKhQkUaD3REdsyd0EBRbjo+rkQYrFFmSLHB3HdYseg7FmPu+Ux 6gTqFmTMM60FaBf+ymDGrMBn9sPj57o= 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 A47C163E73; Wed, 17 May 2023 13:13:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E19EFC433A0; Wed, 17 May 2023 13:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684329206; bh=JGGRsTfqJlmibWTBDdmhkqjrT8ru+5vGeLr90vAqN7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sUL++CNilYTKBfXlj2dPw8lmLxduHSA+47PUjO45sLxz4n2hEzFLajiqXD05oRvI8 26qxQpUDKHthdA9YwLEN/YHntIwAjq5IVk/J7nX75CJFm0yAiW/fp8Unf6Rbj8LRNG UuAyk54JKmTtRzRbemmz9tzUGfiyIgAB+TQe5EXHbuj+wPEfM/oRJtkiWyMRQrpic3 qOjN6jBo+fGjO/IUX/iF6ln8D5N66od5Gncx4RdpQj8+TWomVhhGXJRHHJK3AEjfup 2fvc0cvn3xNc2dtggIu38wLBvRDjizWLgiEZ0mpy6+j/cgELWKA2rntPrjWLUxoYaK TbULgVLN3CPyA== 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 14/14] time_namespace: always provide arch_get_vdso_data() prototype for vdso Date: Wed, 17 May 2023 15:11:02 +0200 Message-Id: <20230517131102.934196-15-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-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 7D74440014 X-Stat-Signature: 5cdmw9qu3sifocztuk44owsfwe7qeg1y X-HE-Tag: 1684329207-747691 X-HE-Meta: U2FsdGVkX19N/4OXb2vixmwapM9dbiHq6bA1yCr6wdcj8IgvRo2G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1h6yxogqSG+flwbxnSuHP9efIbCSHfsPhXxGijubETQi8hcPJ6vgkSDJNYFv6mEzaz6o+Jqbcg5D0de0+VaWnWOrm9reJVUCCz5PmrVe5qApWLLgeBFEqMUq0FfyFs98Pzsw+AELYO3Xb/dmbOtUG5h/JuNA0u7wZ3UJQzW/156KcCzVOZo090O4jOapfl4lRsj0PF/x/mYJEFW2zfr2nsPLpbKg3itzpiBhSbHc779BQOjDGXrsYRY43uKUsdxM= 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 arch_get_vdso_data() function is defined separately on each architecture, but only called when CONFIG_TIME_NS is set. If the definition is a global function, this causes a W=1 warning without TIME_NS: arch/x86/entry/vdso/vma.c:35:19: error: no previous prototype for 'arch_get_vdso_data' [-Werror=missing-prototypes] Move the prototype out of the #ifdef block to reliably turn off that warning. Signed-off-by: Arnd Bergmann --- include/linux/time_namespace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index bb9d3f5542f8..03d9c5ac01d1 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -44,7 +44,6 @@ struct time_namespace *copy_time_ns(unsigned long flags, struct time_namespace *old_ns); void free_time_ns(struct time_namespace *ns); void timens_on_fork(struct nsproxy *nsproxy, struct task_struct *tsk); -struct vdso_data *arch_get_vdso_data(void *vvar_page); struct page *find_timens_vvar_page(struct vm_area_struct *vma); static inline void put_time_ns(struct time_namespace *ns) @@ -163,4 +162,6 @@ static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim) } #endif +struct vdso_data *arch_get_vdso_data(void *vvar_page); + #endif /* _LINUX_TIMENS_H */