public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH v2] sched: Declare sched_rt_bandwidth_account() in include file
Date: Tue, 30 Jun 2020 10:48:21 -0700	[thread overview]
Message-ID: <20200630174821.5780-1-linux@roeck-us.net> (raw)

gcc reports:

kernel/sched/rt.c:626:6: warning:
		no previous prototype for ‘sched_rt_bandwidth_account’

Let's declare it, and remove the declaration from the source file
where it is called.

Fixes: faa5993736d9 ("sched/deadline: Prevent rt_time growth to infinity")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: sched_rt_bandwidth_account() is declared and used unconditionally.

 kernel/sched/deadline.c | 2 --
 kernel/sched/sched.h    | 4 +++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index f63f337c7147..68587e72182d 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -1131,8 +1131,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/sched.h b/kernel/sched/sched.h
index 877fb08eb1b0..82d4754a0e0e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -317,6 +317,8 @@ bool __dl_overflow(struct dl_bw *dl_b, int cpus, u64 old_bw, u64 new_bw)
 	       dl_b->bw * cpus < dl_b->total_bw - old_bw + new_bw;
 }
 
+struct rt_rq;
+
 extern void init_dl_bw(struct dl_bw *dl_b);
 extern int  sched_dl_global_validate(void);
 extern void sched_dl_do_global(void);
@@ -328,6 +330,7 @@ extern bool dl_param_changed(struct task_struct *p, const struct sched_attr *att
 extern int  dl_task_can_attach(struct task_struct *p, const struct cpumask *cs_cpus_allowed);
 extern int  dl_cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial);
 extern bool dl_cpu_busy(unsigned int cpu);
+extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
 
 #ifdef CONFIG_CGROUP_SCHED
 
@@ -335,7 +338,6 @@ extern bool dl_cpu_busy(unsigned int cpu);
 #include <linux/psi.h>
 
 struct cfs_rq;
-struct rt_rq;
 
 extern struct list_head task_groups;
 
-- 
2.17.1


                 reply	other threads:[~2020-06-30 17:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200630174821.5780-1-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox