[PATCH 20/46] kernel: Move prototype declaration to header file sched/sched.h from sched/core.c

Rashika Kheria
2014-02-27T11:53:43Z

Move prototype definition of function to header file
kernel/sched/sched.h from kernel/sched/core.c because it is used by more
than one file.

This eliminates the following warning in kernel/sched/deadline.c:62:6:
kernel/sched/deadline.c:62:6: warning: no previous prototype for ‘init_dl_bw’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
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 b46131e..90570e1 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1985,8 +1985,6 @@ static int dl_overflow(struct task_struct *p, int policy,
return err;
}

-extern void init_dl_bw(struct dl_bw *dl_b);
-
/*
* wake_up_new_task - wake up a newly created task for the first time.
*
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index c2119fd..586613e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1204,6 +1204,7 @@ extern void resched_cpu(int cpu);
extern struct rt_bandwidth def_rt_bandwidth;
extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime);

+void init_dl_bw(struct dl_bw *dl_b);
extern struct dl_bandwidth def_dl_bandwidth;
extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
extern void init_dl_task_timer(struct sched_dl_entity *dl_se);
--
1.7.9.5