From nobody Sat Feb 7 18:51:39 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C82B8C77B73 for ; Mon, 22 May 2023 19:50:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235425AbjEVTup (ORCPT ); Mon, 22 May 2023 15:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235402AbjEVTuj (ORCPT ); Mon, 22 May 2023 15:50:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F93BCF for ; Mon, 22 May 2023 12:50:36 -0700 (PDT) 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 0066962AF3 for ; Mon, 22 May 2023 19:50:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D58A8C433EF; Mon, 22 May 2023 19:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785035; bh=n3hkm02LXOePQNQAyKjmIwhyEzCueusGC98dUMzLcs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=crnD9m0k8IK17T1hRcrALDIZrL2EZaxdKR6l3kSP9Sc6qK6RjlP+rnDSjK8su+7gY qLQ39mynAkbAdU554KNuGFPS4gpTofqUIUje1UTpXRXzfZSh0/i38G9ukA6du0PVv4 XtxmOpbdisIh/b5flVzP0OGOIbuUFMG9w8U+Hcpe+ZPymTX2XqqS6KcHVEnbEa8Lua 3Wlcd335L0P/WFlSdcuCjRAu2LVLKD4xC8qZ6W0tz/+sprXb865bayP075BDmJmZaA FUWK+9471aAPy7W3pj5VAtG0aoZrIZwG3QsH4LoJaVfiqdRTB6B6BUijwqEx+qvL8n ub8rfSp9miAwA== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 1/5] sched: hide unused sched_update_scaling() Date: Mon, 22 May 2023 21:50:17 +0200 Message-Id: <20230522195021.3456768-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann This function is only used when CONFIG_SMP is enabled, without that there is no caller and no prototype: kernel/sched/fair.c:688:5: error: no previous prototype for 'sched_update_s= caling' [-Werror=3Dmissing-prototypes Hide the definition in the same #ifdef check as the declaration. Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs") Signed-off-by: Arnd Bergmann Reviewed-by: Mukesh Ojha Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 48b6f0ca13ac..2c1b345c3b8d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *= cfs_rq) /************************************************************** * Scheduling class statistics methods: */ - +#ifdef CONFIG_SMP int sched_update_scaling(void) { unsigned int factor =3D get_update_sysctl_factor(); @@ -702,6 +702,7 @@ int sched_update_scaling(void) return 0; } #endif +#endif =20 /* * delta /=3D w --=20 2.39.2 From nobody Sat Feb 7 18:51:39 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC6AC77B73 for ; Mon, 22 May 2023 19:50:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235450AbjEVTus (ORCPT ); Mon, 22 May 2023 15:50:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235430AbjEVTun (ORCPT ); Mon, 22 May 2023 15:50:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87F18C1 for ; Mon, 22 May 2023 12:50:39 -0700 (PDT) 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 0705762AF9 for ; Mon, 22 May 2023 19:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7C3AC4339E; Mon, 22 May 2023 19:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785038; bh=xhwlEoX8rvC3pCtoLzeLS25zj8ad4FOpCspq2DY7aWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H0g6emV7k8lIQO10fs31Pa3A6GG17bxFC7XyWvUpir4bw6I6i/d70RJ1Pkgwtk/T1 FbVMh9yvJ+ZnGTW0TwlGJr9rQes/RycjA8oq0E0NWL4GA1/rZ07QrLEgRCxpjlu5Ks +WLT2bZyHOmq2V466tVtudS5Czsf52q69hisuTaKSM6JWjhkqJMwXhiphxC1cxGmXx Wk2CEcBTsekqSWbUArAq7H6oZT3HazUU+6R7ayMt3zhQHy3zVJvMyd0XAbeBqdDqA1 32UZAzdt4Xpq4PoGvivUzuU6rjwb1Gp9YblXAGUM/1gzKCNosw9js5KqhyX6WaZCYk 4f7qhEqUJPocw== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 2/5] sched: add schedule_user() declaration Date: Mon, 22 May 2023 21:50:18 +0200 Message-Id: <20230522195021.3456768-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann The schedule_user() function is used on powerpc and sparc architectures, but only ever called from assembler, so it has no prototype, causing a harmless= W=3D1 warning: kernel/sched/core.c:6730:35: error: no previous prototype for 'schedule_use= r' [-Werror=3Dmissing-prototypes] Add a prototype in sched/sched.h to shut up the warning. Signed-off-by: Arnd Bergmann Reviewed-by: Vincent Guittot --- kernel/sched/sched.h | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 1704763897d0..44b34836bb60 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2376,6 +2376,7 @@ static inline struct cpuidle_state *idle_get_state(st= ruct rq *rq) #endif =20 extern void schedule_idle(void); +asmlinkage void schedule_user(void); =20 extern void sysrq_sched_debug_show(void); extern void sched_init_granularity(void); --=20 2.39.2 From nobody Sat Feb 7 18:51:39 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68F01C77B73 for ; Mon, 22 May 2023 19:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235374AbjEVTuw (ORCPT ); Mon, 22 May 2023 15:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235422AbjEVTup (ORCPT ); Mon, 22 May 2023 15:50:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D44184 for ; Mon, 22 May 2023 12:50:42 -0700 (PDT) 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 162C062B04 for ; Mon, 22 May 2023 19:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0258C433EF; Mon, 22 May 2023 19:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785041; bh=DfCIKMSnSbVddp/C9i9OSpp88I+LZk39yiHKdmQAty0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PYEj2zOl4sr+IPXQ2IhzxhmUaEl68mRHT68KXDtpvG03OJsbvAgC5n6lsQ2UKyVqb YtWkwMdy73DW6kHmOJ2ZF+BajlBadfaHhEUz0kqYkOx9aPM0kgGM8xEps1mWqJCOwe 8bvQFdtDtsar4Yuqhr1mnhAidLPWxM85+HVmq7bMCmCGK5ohb4rbZ5igCRn1TITVgJ C8EGEv+tf3AsEX3fI+eQ3XaBeMjCqMb1JXpDK+PwcX60ZJzwUTjD7YBldQWaS03jF2 L6p74B5L3bAfBP/VrDwvQzxCHY9U9rifoc1zjWri3YqPBRTYAQo7sCDFw5GATkfLpv QhmQ9g+2h/Glw== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 3/5] sched: fair: hide unused init_cfs_bandwidth() stub Date: Mon, 22 May 2023 21:50:19 +0200 Message-Id: <20230522195021.3456768-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann init_cfs_bandwidth() is only used when CONFIG_FAIR_GROUP_SCHED is enabled, and without this causes a W=3D1 warning for the missing prototype: kernel/sched/fair.c:6131:6: error: no previous prototype for 'init_cfs_band= width' The normal implementation is only defined for CONFIG_CFS_BANDWIDTH, so the stub exists when CFS_BANDWIDTH is disabled but FAIR_GROUP_SCHED is enabled. Signed-off-by: Arnd Bergmann Reviewed-by: Mukesh Ojha Reviewed-by: Vincent Guittot --- kernel/sched/fair.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2c1b345c3b8d..a7a8ccde3bd7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6169,9 +6169,8 @@ static inline int throttled_lb_pair(struct task_group= *tg, return 0; } =20 -void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} - #ifdef CONFIG_FAIR_GROUP_SCHED +void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {} #endif =20 --=20 2.39.2 From nobody Sat Feb 7 18:51:39 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EC49C77B73 for ; Mon, 22 May 2023 19:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235453AbjEVTvA (ORCPT ); Mon, 22 May 2023 15:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235391AbjEVTur (ORCPT ); Mon, 22 May 2023 15:50:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A3D1C1 for ; Mon, 22 May 2023 12:50:45 -0700 (PDT) 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 21DA362AF9 for ; Mon, 22 May 2023 19:50:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBC0FC4339B; Mon, 22 May 2023 19:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785044; bh=DHB3E3whHUuZqeuu1DX7URmHv9V7oPFeShT/zXTe+DA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LTCRW8mvE+v+Qu9tfP6jNx3wcAib4AscGGz4Yi3vX0P6du6+fNQkfijJ4gOBxUEKV ZtPnFk9Dp7WlkzMvR/pj6r+WRzYXOpj6du4PA9p1dNnC21g4h5MhBqQF18eMM/otmD a6XRLVpIfXIsOvU3jIU0timMeTB/HBUDeNhW4OxfyQKctWeMgQD52yYGU7L3NGVUgI eZOXGbIiXYSC7Bn/CxAkj1A8L7FM754F756W9iiwwRdDOUpC86ogUwrTw/a83Bb0cS zpBzW+Ge7GZOtaQTDxMdtUE0NsMQ+M5JCA7WQvAlIzIVqJGiPW7JJdtaCRUkFKyKDW 9W56i/cl8X8Iw== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 4/5] sched: make task_vruntime_update() prototype visible Date: Mon, 22 May 2023 21:50:20 +0200 Message-Id: <20230522195021.3456768-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Arnd Bergmann Having the prototype next to the caller but not visible to the callee causes a W=3D1 warning: kernel/sched/fair.c:11985:6: error: no previous prototype for 'task_vruntim= e_update' [-Werror=3Dmissing-prototypes] Move this to a header, as we do for all other function declarations. Signed-off-by: Arnd Bergmann Reviewed-by: Mukesh Ojha Reviewed-by: Vincent Guittot --- kernel/sched/core.c | 2 -- kernel/sched/sched.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 044bcdf4181a..aae6ff717c55 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6030,8 +6030,6 @@ static inline struct task_struct *pick_task(struct rq= *rq) BUG(); /* The idle class should always have a runnable task. */ } =20 -extern void task_vruntime_update(struct rq *rq, struct task_struct *p, boo= l in_fi); - static void queue_core_balance(struct rq *rq); =20 static struct task_struct * diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 44b34836bb60..d5ac0af1eede 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1245,6 +1245,7 @@ static inline raw_spinlock_t *__rq_lockp(struct rq *r= q) =20 bool cfs_prio_less(const struct task_struct *a, const struct task_struct *= b, bool fi); +void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi= ); =20 /* * Helpers to check if the CPU's core cookie matches with the task's cookie --=20 2.39.2 From nobody Sat Feb 7 18:51:39 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4AD8C7EE23 for ; Mon, 22 May 2023 19:51:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235507AbjEVTvF (ORCPT ); Mon, 22 May 2023 15:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235464AbjEVTu4 (ORCPT ); Mon, 22 May 2023 15:50:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73ECD186 for ; Mon, 22 May 2023 12:50:48 -0700 (PDT) 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 2D99B62B11 for ; Mon, 22 May 2023 19:50:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07C60C4339C; Mon, 22 May 2023 19:50:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684785047; bh=HMrD03u6K+/VHY9xLyPNlLoBBgFtU0+LXebB+R5ntic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HNu10GzquFi3F4cNVyQ1jrCdEeHnO6oQz6W7NEDY7Zexxuma26WWwjKScT2y5r3gM 8WsSXdHyHdKtReVJHbcwXGRWG2KdH3Pi11K4jC37/lg22XdEBuLaaGvsp/4JIHdNt4 092IEA1A311rNFqt1q15Va0jBoFf/JfpYyukqK/chrbCP44M6q57SFcUb9ptS97AKg 2dnRww6uM1CtyJlz5pXVBAlcY46/bKd44rCJ+gmdsmsiyu/IlaWRZvfUt7TptpNTux trWOOmDVhJoXtJ7DVc9Fp0BewdU2zK45qipleGrWesGm0WHUFWbI7skAi+i0CAZZoq NC5p/CLXv9pRw== From: Arnd Bergmann To: Ingo Molnar , Peter Zijlstra Cc: Arnd Bergmann , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Subject: [PATCH 5/5] sched: fair: move unused stub functions to header Date: Mon, 22 May 2023 21:50:21 +0200 Message-Id: <20230522195021.3456768-6-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230522195021.3456768-1-arnd@kernel.org> References: <20230522195021.3456768-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3D1 warning: kernel/sched/fair.c:12544:6: error: no previous prototype for 'free_fair_sc= hed_group' kernel/sched/fair.c:12546:5: error: no previous prototype for 'alloc_fair_s= ched_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_f= air_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. Signed-off-by: Arnd Bergmann Reviewed-by: Mukesh Ojha Reviewed-by: Vincent Guittot --- 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 a7a8ccde3bd7..bae8907c1635 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12602,19 +12602,6 @@ int sched_group_set_idle(struct task_group *tg, lo= ng idle) return 0; } =20 -#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 *paren= t) -{ - 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 */ =20 =20 diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index d5ac0af1eede..0584fa15ffeb 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -453,10 +453,21 @@ static inline int walk_tg_tree(tg_visitor down, tg_vi= sitor up, void *data) =20 extern int tg_nop(struct task_group *tg, void *data); =20 +#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 tas= k_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); --=20 2.39.2