Skip to content

Commit b1546ed

Browse files
YueHaibingingomolnar
authored andcommitted
sched/core: Make some functions static
Fix these sparse warnings: kernel/sched/core.c:6577:11: warning: symbol 'min_cfs_quota_period' was not declared. Should it be static? kernel/sched/core.c:6657:5: warning: symbol 'tg_set_cfs_quota' was not declared. Should it be static? kernel/sched/core.c:6670:6: warning: symbol 'tg_get_cfs_quota' was not declared. Should it be static? kernel/sched/core.c:6683:5: warning: symbol 'tg_set_cfs_period' was not declared. Should it be static? kernel/sched/core.c:6693:6: warning: symbol 'tg_get_cfs_period' was not declared. Should it be static? kernel/sched/fair.c:2596:6: warning: symbol 'task_tick_numa' was not declared. Should it be static? Signed-off-by: YueHaibing <yuehaibing@huawei.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20190418144713.34332-1-yuehaibing@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 7dd7788 commit b1546ed

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎kernel/sched/core.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6522,7 +6522,7 @@ static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
65226522
static DEFINE_MUTEX(cfs_constraints_mutex);
65236523

65246524
const u64 max_cfs_quota_period = 1 * NSEC_PER_SEC; /* 1s */
6525-
const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
6525+
static const u64 min_cfs_quota_period = 1 * NSEC_PER_MSEC; /* 1ms */
65266526

65276527
static int __cfs_schedulable(struct task_group *tg, u64 period, u64 runtime);
65286528

@@ -6602,7 +6602,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg, u64 period, u64 quota)
66026602
return ret;
66036603
}
66046604

6605-
int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
6605+
static int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
66066606
{
66076607
u64 quota, period;
66086608

@@ -6615,7 +6615,7 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
66156615
return tg_set_cfs_bandwidth(tg, period, quota);
66166616
}
66176617

6618-
long tg_get_cfs_quota(struct task_group *tg)
6618+
static long tg_get_cfs_quota(struct task_group *tg)
66196619
{
66206620
u64 quota_us;
66216621

@@ -6628,7 +6628,7 @@ long tg_get_cfs_quota(struct task_group *tg)
66286628
return quota_us;
66296629
}
66306630

6631-
int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
6631+
static int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
66326632
{
66336633
u64 quota, period;
66346634

@@ -6638,7 +6638,7 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
66386638
return tg_set_cfs_bandwidth(tg, period, quota);
66396639
}
66406640

6641-
long tg_get_cfs_period(struct task_group *tg)
6641+
static long tg_get_cfs_period(struct task_group *tg)
66426642
{
66436643
u64 cfs_period_us;
66446644

‎kernel/sched/fair.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ void task_numa_work(struct callback_head *work)
25932593
/*
25942594
* Drive the periodic memory faults..
25952595
*/
2596-
void task_tick_numa(struct rq *rq, struct task_struct *curr)
2596+
static void task_tick_numa(struct rq *rq, struct task_struct *curr)
25972597
{
25982598
struct callback_head *work = &curr->numa_work;
25992599
u64 period, now;

0 commit comments

Comments
 (0)