summaryrefslogtreecommitdiffstats
path: root/kernel/sched_debug.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-11-04 16:17:05 +0800
committerIngo Molnar <mingo@elte.hu>2008-11-04 10:23:18 +0100
commit0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d (patch)
tree22a50ee7f1c5a4c6ae4a13c30b02c9faa52e0aa4 /kernel/sched_debug.c
parenteefd796a8e831408ce17e633d73d70430748c47a (diff)
downloadlinux-stable-0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d.tar.gz
linux-stable-0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d.tar.bz2
linux-stable-0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d.zip
sched debug: remove NULL checking in print_cfs/rt_rq()
Impact: cleanup cfs->tg is initialized in init_tg_cfs_entry() with tg != NULL, and will never be invalidated to NULL. And the underlying cgroup of a valid task_group is always valid. Same for rt->tg. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r--kernel/sched_debug.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 5ae17762ec32..d25cefe3f0eb 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -121,14 +121,9 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
#if defined(CONFIG_CGROUP_SCHED) && defined(CONFIG_FAIR_GROUP_SCHED)
char path[128] = "";
- struct cgroup *cgroup = NULL;
struct task_group *tg = cfs_rq->tg;
- if (tg)
- cgroup = tg->css.cgroup;
-
- if (cgroup)
- cgroup_path(cgroup, path, sizeof(path));
+ cgroup_path(tg->css.cgroup, path, sizeof(path));
SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path);
#else
@@ -193,14 +188,9 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
{
#if defined(CONFIG_CGROUP_SCHED) && defined(CONFIG_RT_GROUP_SCHED)
char path[128] = "";
- struct cgroup *cgroup = NULL;
struct task_group *tg = rt_rq->tg;
- if (tg)
- cgroup = tg->css.cgroup;
-
- if (cgroup)
- cgroup_path(cgroup, path, sizeof(path));
+ cgroup_path(tg->css.cgroup, path, sizeof(path));
SEQ_printf(m, "\nrt_rq[%d]:%s\n", cpu, path);
#else