From patchwork Thu Nov 23 11:05: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: 746769 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF9C2200CD; Thu, 23 Nov 2023 11:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nXSKUa80" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32336C433C8; Thu, 23 Nov 2023 11:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700737528; bh=PTPvyroKGj+bJmSOqebpW9CjBUzzYiO7xPn/MeixGLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nXSKUa807rZ29ZDLQfJmvRhSi4N8WHovmHbAfyMVEficfSwAV9byFeM2EehuHMPvf 2plHjQPIGprL9a+CvVI91LktsH4dCLOTw85PLAzRHbTDWS8PBJ+HD6a6zbcFYzYA7S /LF4mUwnNE/22hs/ycyxoIHFHiNWy/JLf4Gu9DuVWVIbobN3N9tuy8iVJrVYE3ouLt kJi1liD6r+5hhz0cNDST79u04zevwc68Rku5RvjzatdqYLmQop3cbiP1tDQ8ikihWg Ed5QrWidUanGzm2kwC1ytck42YRJYbIN/BD477srlxzuaH3tVo4HVndRuycbh+BrmA FTpBsaIVkDHAA== From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , "David S. Miller" , David Woodhouse , Dinh Nguyen , Greg Kroah-Hartman , Ivan Kokshaysky , John Paul Adrian Glaubitz , Michael Ellerman , Masahiro Yamada , Matt Turner , Nathan Chancellor , Nicolas Schier , Peter Zijlstra , Rich Felker , Richard Henderson , Richard Weinberger , Stephen Rothwell , Thomas Bogendoerfer , Tudor Ambarus , Yoshinori Sato , linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, linux-sh@vger.kernel.org, linux-usb@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v3 1/6] ida: make 'ida_dump' static Date: Thu, 23 Nov 2023 12:05:01 +0100 Message-Id: <20231123110506.707903-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231123110506.707903-1-arnd@kernel.org> References: <20231123110506.707903-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann There is no global declaration for ida_dump() and no other callers, so make it static to avoid this warning: lib/test_ida.c:16:6: error: no previous prototype for 'ida_dump' Fixes: 8ab8ba38d488 ("ida: Start new test_ida module") Signed-off-by: Arnd Bergmann --- lib/test_ida.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_ida.c b/lib/test_ida.c index b06880625961..f946c80ced8b 100644 --- a/lib/test_ida.c +++ b/lib/test_ida.c @@ -13,7 +13,7 @@ static unsigned int tests_run; static unsigned int tests_passed; #ifdef __KERNEL__ -void ida_dump(struct ida *ida) { } +static void ida_dump(struct ida *ida) { } #endif #define IDA_BUG_ON(ida, x) do { \ tests_run++; \ From patchwork Thu Nov 23 11:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 746768 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF91D22EE6; Thu, 23 Nov 2023 11:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b4qyrx9u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CE8AC433C9; Thu, 23 Nov 2023 11:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700737541; bh=tQoPadTOpEfcWFltgm4ylsWb6Qh7U5RzNAmqeA9wbms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b4qyrx9uuOYtARoBjjr3USSBbEXBVLT5+2YQt8UDuwSWOOjf/oxUtL6+Qaqgn1lHY U1iMAw+0oevXiM45qg8DWQRguuekx5nG/LH4T/UrhEC9jYaJLhnCSes0KEHDGJepMW EZa2UdrCcQC7mzu1KF1jgmLnI5rAwETjdiH0Pqww7458j+MaIjCDMCNfxUjRlNQ/f2 8QTqlMhE7BjvuWSLJEVDbQdNeHo+BAi/qGOnoD8MmIyKDc7pbImozDFyxKcmWK29M/ 8PW4kzF/3W9218KayKV8Z84KdQ6I+BiL/C/tm2vM4TkwgwH7TMj15madZX6mZcV3O9 R96xC7kcdciaA== From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , "David S. Miller" , David Woodhouse , Dinh Nguyen , Greg Kroah-Hartman , Ivan Kokshaysky , John Paul Adrian Glaubitz , Michael Ellerman , Masahiro Yamada , Matt Turner , Nathan Chancellor , Nicolas Schier , Peter Zijlstra , Rich Felker , Richard Henderson , Richard Weinberger , Stephen Rothwell , Thomas Bogendoerfer , Tudor Ambarus , Yoshinori Sato , linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, linux-sh@vger.kernel.org, linux-usb@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v3 3/6] sched: fair: move unused stub functions to header Date: Thu, 23 Nov 2023 12:05:03 +0100 Message-Id: <20231123110506.707903-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231123110506.707903-1-arnd@kernel.org> References: <20231123110506.707903-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1 warning: kernel/sched/fair.c:12544:6: error: no previous prototype for 'free_fair_sched_group' kernel/sched/fair.c:12546:5: error: no previous prototype for 'alloc_fair_sched_group' kernel/sched/fair.c:12553:6: error: no previous prototype for 'online_fair_sched_group' kernel/sched/fair.c:12555:6: error: no previous prototype for 'unregister_fair_sched_group' Move the alternatives into the header as static inline functions with the correct combination of #ifdef checks to avoid the warning without adding even more complexity. [A different patch with the same description got applied by accident and was later reverted, but the original patch is still missing] Fixes: 7aa55f2a5902 ("sched/fair: Move unused stub functions to header") Signed-off-by: Arnd Bergmann --- kernel/sched/fair.c | 13 ------------- kernel/sched/sched.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 07f555857698..cb68d71c81bc 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -13040,19 +13040,6 @@ int sched_group_set_idle(struct task_group *tg, long idle) return 0; } -#else /* CONFIG_FAIR_GROUP_SCHED */ - -void free_fair_sched_group(struct task_group *tg) { } - -int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) -{ - return 1; -} - -void online_fair_sched_group(struct task_group *tg) { } - -void unregister_fair_sched_group(struct task_group *tg) { } - #endif /* CONFIG_FAIR_GROUP_SCHED */ diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 8a70d51ffa33..eb7e07a1abcc 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -461,10 +461,21 @@ static inline int walk_tg_tree(tg_visitor down, tg_visitor up, void *data) extern int tg_nop(struct task_group *tg, void *data); +#ifdef CONFIG_FAIR_GROUP_SCHED extern void free_fair_sched_group(struct task_group *tg); extern int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent); extern void online_fair_sched_group(struct task_group *tg); extern void unregister_fair_sched_group(struct task_group *tg); +#else +static inline void free_fair_sched_group(struct task_group *tg) { } +static inline int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) +{ + return 1; +} +static inline void online_fair_sched_group(struct task_group *tg) { } +static inline void unregister_fair_sched_group(struct task_group *tg) { } +#endif + extern void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq, struct sched_entity *se, int cpu, struct sched_entity *parent); From patchwork Thu Nov 23 11:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 746767 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0390B22EEA; Thu, 23 Nov 2023 11:05:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iXbiFiob" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A8CFC433C9; Thu, 23 Nov 2023 11:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700737554; bh=5+tWyKAC++2Xnrgn3NdMaK+q0ya4fE8D9fGwVpiP1Ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iXbiFiobNLe2JxXPcmWo8nLzQzuJ0EtGXlolJinYPcK8B4Od9jeB6dYYWU2PW8lSJ BTfn/20C6mIUm6KnKVQeLfRm+HqiNXQ8oCH9vNKLmuW7UOodeeKs53SgxP43UUPoSe 8Iz6MqbaJhXWowQn+jh8OjVf/qnu4NDtJWRpJlKqOzlWU4zMZ7zPLYmi1YEI0g4oEC XVRgDyaGG2thEMkLswRlGbobUzOJ3FHm0aivGz6nvO4BDbcezPzh9l/PpE9NdLMX96 ywX7Dm1pTI5o9GhFTua14j7NbMXLxSj4wAD9bpq5ApXsxQVxQDfxgKt3Zza62nnT5P sQ1jMRTTLFHGg== From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , "David S. Miller" , David Woodhouse , Dinh Nguyen , Greg Kroah-Hartman , Ivan Kokshaysky , John Paul Adrian Glaubitz , Michael Ellerman , Masahiro Yamada , Matt Turner , Nathan Chancellor , Nicolas Schier , Peter Zijlstra , Rich Felker , Richard Henderson , Richard Weinberger , Stephen Rothwell , Thomas Bogendoerfer , Tudor Ambarus , Yoshinori Sato , linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, linux-sh@vger.kernel.org, linux-usb@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: [PATCH v3 5/6] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static Date: Thu, 23 Nov 2023 12:05:05 +0100 Message-Id: <20231123110506.707903-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231123110506.707903-1-arnd@kernel.org> References: <20231123110506.707903-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Arnd Bergmann This function is only called locally and should always have been static: drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes] Fixes: 230f7ede6c2f ("USB: add USB EHCI support for MPC5121 SoC") Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann --- drivers/usb/host/fsl-mph-dr-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 8508d37a2aff..6cdc3d805c32 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -288,7 +288,7 @@ static void fsl_usb2_mph_dr_of_remove(struct platform_device *ofdev) #define PHYCTRL_LSFE (1 << 1) /* Line State Filter Enable */ #define PHYCTRL_PXE (1 << 0) /* PHY oscillator enable */ -int fsl_usb2_mpc5121_init(struct platform_device *pdev) +static int fsl_usb2_mpc5121_init(struct platform_device *pdev) { struct fsl_usb2_platform_data *pdata = dev_get_platdata(&pdev->dev); struct clk *clk;