lkml.org 
[lkml]   [2019]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next] cgroup: remove set but not used variable 'cgrp'
Date
From: YueHaibing <yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

kernel/cgroup/cgroup.c: In function 'cgroup_post_fork':
kernel/cgroup/cgroup.c:5946:19: warning: variable 'cgrp' set but not used [-Wunused-but-set-variable]

It is never used since introduction in
commit 76f969e8948d ("cgroup: cgroup v2 freezer")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
kernel/cgroup/cgroup.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 6f09f9b..c9f208d 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5943,11 +5943,8 @@ void cgroup_post_fork(struct task_struct *child)
* the task into the frozen state.
*/
if (unlikely(cgroup_task_freeze(child))) {
- struct cgroup *cgrp;
-
spin_lock(&child->sighand->siglock);
WARN_ON_ONCE(child->frozen);
- cgrp = cset->dfl_cgrp;
child->jobctl |= JOBCTL_TRAP_FREEZE;
spin_unlock(&child->sighand->siglock);

--
2.7.4

\
 
 \ /
  Last update: 2019-04-24 10:07    [W:0.025 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site