mirror of https://lore.kernel.org/lkml/
 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] sched: Declare sched_rt_bandwidth_account() in include file
Date: Fri, 26 Jun 2020 07:02:53 -0700	[thread overview]
Message-ID: <20200626140253.141358-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>
---
Note:
    I know that checkpatch complains about this.
    I declared the function 'extern' to match other declarations in sched.h.

 kernel/sched/deadline.c | 2 --
 kernel/sched/sched.h    | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 504d2f51b0d6..ca1b66db5787 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 1d4e94c1e5fe..02c5d48ed7f3 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -469,6 +469,7 @@ extern int sched_group_set_rt_period(struct task_group *tg, u64 rt_period_us);
 extern long sched_group_rt_runtime(struct task_group *tg);
 extern long sched_group_rt_period(struct task_group *tg);
 extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk);
+extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
 
 extern struct task_group *sched_create_group(struct task_group *parent);
 extern void sched_online_group(struct task_group *tg,
-- 
2.17.1


             reply	other threads:[~2020-06-26 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 14:02 Guenter Roeck [this message]
2020-06-26 15:03 ` kernel test robot
2020-06-26 19:16 ` kernel test robot
2020-06-26 22:41   ` Guenter Roeck

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=20200626140253.141358-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

all inboxes | Powered by JetHome®