Skip to content

Commit

Permalink
sched: fix warning
Browse files Browse the repository at this point in the history
This patch fixes the following warning:

kernel/sched.c:1667: warning: 'cfs_rq_set_shares' defined but not used

This seems the correct way to fix this; cfs_rq_set_shares() is only used
in a single place, which is also inside #ifdef CONFIG_FAIR_GROUP_SCHED.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Vegard Nossum authored and Ingo Molnar committed Jun 30, 2008
1 parent 34e83e8 commit 3043209
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1641,12 +1641,14 @@ static inline void update_shares_locked(struct rq *rq, struct sched_domain *sd)

#endif

#ifdef CONFIG_FAIR_GROUP_SCHED
static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
{
#if defined(CONFIG_SMP) && defined(CONFIG_FAIR_GROUP_SCHED)
#ifdef CONFIG_SMP
cfs_rq->shares = shares;
#endif
}
#endif

#include "sched_stats.h"
#include "sched_idletask.c"
Expand Down

0 comments on commit 3043209

Please sign in to comment.