linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: sched/core] sched: Fix -Wmissing-prototype
@ 2021-09-16 11:59 tip-bot2 for Peter Zijlstra
  2021-09-17 16:57 ` Peter Oskolkov
  0 siblings, 1 reply; 3+ messages in thread
From: tip-bot2 for Peter Zijlstra @ 2021-09-16 11:59 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Peter Zijlstra (Intel), x86, linux-kernel

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     98a3270911f7abe2871a60799c20c95c9f991ddb
Gitweb:        https://git.kernel.org/tip/98a3270911f7abe2871a60799c20c95c9f991ddb
Author:        Peter Zijlstra <peterz@infradead.org>
AuthorDate:    Mon, 13 Sep 2021 15:27:44 +02:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 15 Sep 2021 17:49:00 +02:00

sched: Fix -Wmissing-prototype

  kernel/sched/fair.c:5403:6: warning: no previous prototype for ‘init_cfs_bandwidth’ [-Wmissing-prototypes]
  kernel/sched/fair.c:11525:6: warning: no previous prototype for ‘free_fair_sched_group’ [-Wmissing-prototypes]
  kernel/sched/fair.c:11527:5: warning: no previous prototype for ‘alloc_fair_sched_group’ [-Wmissing-prototypes]
  kernel/sched/fair.c:11532:6: warning: no previous prototype for ‘online_fair_sched_group’ [-Wmissing-prototypes]
  kernel/sched/fair.c:11534:6: warning: no previous prototype for ‘unregister_fair_sched_group’ [-Wmissing-prototypes]

  kernel/sched/rt.c:253:6: warning: no previous prototype for ‘free_rt_sched_group’ [-Wmissing-prototypes]
  kernel/sched/rt.c:255:5: warning: no previous prototype for ‘alloc_rt_sched_group’ [-Wmissing-prototypes]
  kernel/sched/rt.c:669:6: warning: no previous prototype for ‘sched_rt_bandwidth_account’ [-Wmissing-prototypes]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 kernel/sched/deadline.c |  2 --
 kernel/sched/fair.c     | 15 ---------------
 kernel/sched/rt.c       |  6 ------
 kernel/sched/sched.h    |  2 ++
 4 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d2c072b..29dd188 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1191,8 +1191,6 @@ int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
 	return (dl_se->runtime <= 0);
 }
 
-extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
-
 /*
  * This function implements the GRUB accounting rule:
  * according to the GRUB reclaiming algorithm, the runtime is
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e26d622..9571254 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5408,8 +5408,6 @@ static inline int throttled_lb_pair(struct task_group *tg,
 	return 0;
 }
 
-void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
-
 #ifdef CONFIG_FAIR_GROUP_SCHED
 static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {}
 #endif
@@ -11562,19 +11560,6 @@ next_cpu:
 	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/rt.c b/kernel/sched/rt.c
index bb945f8..929fb37 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -250,12 +250,6 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
 	return &rq->rt;
 }
 
-void free_rt_sched_group(struct task_group *tg) { }
-
-int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
-{
-	return 1;
-}
 #endif /* CONFIG_RT_GROUP_SCHED */
 
 #ifdef CONFIG_SMP
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 094ea86..1d8bc76 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -3065,3 +3065,5 @@ extern int sched_dynamic_mode(const char *str);
 extern void sched_dynamic_update(int mode);
 #endif
 
+extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
+

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [tip: sched/core] sched: Fix -Wmissing-prototype
  2021-09-16 11:59 [tip: sched/core] sched: Fix -Wmissing-prototype tip-bot2 for Peter Zijlstra
@ 2021-09-17 16:57 ` Peter Oskolkov
  2021-09-17 18:26   ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Oskolkov @ 2021-09-17 16:57 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: linux-tip-commits, Peter Zijlstra (Intel), x86

On Thu, Sep 16, 2021 at 4:59 AM tip-bot2 for Peter Zijlstra
<tip-bot2@linutronix.de> wrote:
>
> The following commit has been merged into the sched/core branch of tip:
>
> Commit-ID:     98a3270911f7abe2871a60799c20c95c9f991ddb

$ make defconfig
$ make -j16

ld: kernel/sched/core.o: in function `sched_free_group':
core.c:(.text+0x2cfd): undefined reference to `free_rt_sched_group'
ld: kernel/sched/core.o: in function `sched_create_group':
core.c:(.text+0xbdcb): undefined reference to `alloc_rt_sched_group'
ld: kernel/sched/core.o: in function `sched_init':
core.c:(.init.text+0x335): undefined reference to `init_cfs_bandwidth'
ld: kernel/sched/fair.o: in function `alloc_fair_sched_group':
fair.c:(.text+0x8427): undefined reference to `init_cfs_bandwidth'
make: *** [Makefile:1196: vmlinux] Error 1

Reverting this patch fixes the issue.

> Gitweb:        https://git.kernel.org/tip/98a3270911f7abe2871a60799c20c95c9f991ddb
> Author:        Peter Zijlstra <peterz@infradead.org>
> AuthorDate:    Mon, 13 Sep 2021 15:27:44 +02:00
> Committer:     Peter Zijlstra <peterz@infradead.org>
> CommitterDate: Wed, 15 Sep 2021 17:49:00 +02:00
>
> sched: Fix -Wmissing-prototype
>
>   kernel/sched/fair.c:5403:6: warning: no previous prototype for ‘init_cfs_bandwidth’ [-Wmissing-prototypes]
>   kernel/sched/fair.c:11525:6: warning: no previous prototype for ‘free_fair_sched_group’ [-Wmissing-prototypes]
>   kernel/sched/fair.c:11527:5: warning: no previous prototype for ‘alloc_fair_sched_group’ [-Wmissing-prototypes]
>   kernel/sched/fair.c:11532:6: warning: no previous prototype for ‘online_fair_sched_group’ [-Wmissing-prototypes]
>   kernel/sched/fair.c:11534:6: warning: no previous prototype for ‘unregister_fair_sched_group’ [-Wmissing-prototypes]
>
>   kernel/sched/rt.c:253:6: warning: no previous prototype for ‘free_rt_sched_group’ [-Wmissing-prototypes]
>   kernel/sched/rt.c:255:5: warning: no previous prototype for ‘alloc_rt_sched_group’ [-Wmissing-prototypes]
>   kernel/sched/rt.c:669:6: warning: no previous prototype for ‘sched_rt_bandwidth_account’ [-Wmissing-prototypes]
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
>  kernel/sched/deadline.c |  2 --
>  kernel/sched/fair.c     | 15 ---------------
>  kernel/sched/rt.c       |  6 ------
>  kernel/sched/sched.h    |  2 ++
>  4 files changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index d2c072b..29dd188 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -1191,8 +1191,6 @@ int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
>         return (dl_se->runtime <= 0);
>  }
>
> -extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
> -
>  /*
>   * This function implements the GRUB accounting rule:
>   * according to the GRUB reclaiming algorithm, the runtime is
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index e26d622..9571254 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5408,8 +5408,6 @@ static inline int throttled_lb_pair(struct task_group *tg,
>         return 0;
>  }
>
> -void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
> -
>  #ifdef CONFIG_FAIR_GROUP_SCHED
>  static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {}
>  #endif
> @@ -11562,19 +11560,6 @@ next_cpu:
>         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/rt.c b/kernel/sched/rt.c
> index bb945f8..929fb37 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -250,12 +250,6 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
>         return &rq->rt;
>  }
>
> -void free_rt_sched_group(struct task_group *tg) { }
> -
> -int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
> -{
> -       return 1;
> -}
>  #endif /* CONFIG_RT_GROUP_SCHED */
>
>  #ifdef CONFIG_SMP
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 094ea86..1d8bc76 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -3065,3 +3065,5 @@ extern int sched_dynamic_mode(const char *str);
>  extern void sched_dynamic_update(int mode);
>  #endif
>
> +extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
> +

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip: sched/core] sched: Fix -Wmissing-prototype
  2021-09-17 16:57 ` Peter Oskolkov
@ 2021-09-17 18:26   ` Peter Zijlstra
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2021-09-17 18:26 UTC (permalink / raw)
  To: Peter Oskolkov; +Cc: Linux Kernel Mailing List, linux-tip-commits, x86

On Fri, Sep 17, 2021 at 09:57:37AM -0700, Peter Oskolkov wrote:
> On Thu, Sep 16, 2021 at 4:59 AM tip-bot2 for Peter Zijlstra
> <tip-bot2@linutronix.de> wrote:
> >
> > The following commit has been merged into the sched/core branch of tip:
> >
> > Commit-ID:     98a3270911f7abe2871a60799c20c95c9f991ddb
> 
> $ make defconfig
> $ make -j16
> 
> ld: kernel/sched/core.o: in function `sched_free_group':
> core.c:(.text+0x2cfd): undefined reference to `free_rt_sched_group'
> ld: kernel/sched/core.o: in function `sched_create_group':
> core.c:(.text+0xbdcb): undefined reference to `alloc_rt_sched_group'
> ld: kernel/sched/core.o: in function `sched_init':
> core.c:(.init.text+0x335): undefined reference to `init_cfs_bandwidth'
> ld: kernel/sched/fair.o: in function `alloc_fair_sched_group':
> fair.c:(.text+0x8427): undefined reference to `init_cfs_bandwidth'
> make: *** [Makefile:1196: vmlinux] Error 1
> 
> Reverting this patch fixes the issue.

Moo, ok, I'll go figure that out ... too damn many CONFIG_ knobs is
what.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-17 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 11:59 [tip: sched/core] sched: Fix -Wmissing-prototype tip-bot2 for Peter Zijlstra
2021-09-17 16:57 ` Peter Oskolkov
2021-09-17 18:26   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).