All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] cgroup: remove set but not used variable 'cgrp'
@ 2019-04-24  8:06 ` Yue Haibing
  0 siblings, 0 replies; 2+ messages in thread
From: Yue Haibing @ 2019-04-24  8:06 UTC (permalink / raw)
  To: tj, hannes, lizefan; +Cc: linux-kernel, cgroups, YueHaibing

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH -next] cgroup: remove set but not used variable 'cgrp'
@ 2019-04-24  8:06 ` Yue Haibing
  0 siblings, 0 replies; 2+ messages in thread
From: Yue Haibing @ 2019-04-24  8:06 UTC (permalink / raw)
  To: tj, hannes, lizefan; +Cc: linux-kernel, cgroups, YueHaibing

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-24  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  8:06 [PATCH -next] cgroup: remove set but not used variable 'cgrp' Yue Haibing
2019-04-24  8:06 ` Yue Haibing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.