linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] cpuset: Remove set but not used variable 'cs'
@ 2018-12-01  3:12 YueHaibing
  2018-12-03 16:25 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-12-01  3:12 UTC (permalink / raw)
  To: Li Zefan, tj, mingo; +Cc: YueHaibing, cgroups, linux-kernel, kernel-janitors

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

kernel/cgroup/cpuset.c: In function 'cpuset_cancel_attach':
kernel/cgroup/cpuset.c:2167:17: warning:
 variable 'cs' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit 1f7dd3e5a6e4 ("cgroup: fix handling
of multi-destination migration from subtree_control enabling")

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

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index e9f6906..48cfe55 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -2164,10 +2164,8 @@ static int cpuset_can_attach(struct cgroup_taskset *tset)
 static void cpuset_cancel_attach(struct cgroup_taskset *tset)
 {
 	struct cgroup_subsys_state *css;
-	struct cpuset *cs;
 
 	cgroup_taskset_first(tset, &css);
-	cs = css_cs(css);
 
 	mutex_lock(&cpuset_mutex);
 	css_cs(css)->attach_in_progress--;




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

* Re: [PATCH -next] cpuset: Remove set but not used variable 'cs'
  2018-12-01  3:12 [PATCH -next] cpuset: Remove set but not used variable 'cs' YueHaibing
@ 2018-12-03 16:25 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2018-12-03 16:25 UTC (permalink / raw)
  To: YueHaibing; +Cc: Li Zefan, mingo, cgroups, linux-kernel, kernel-janitors

On Sat, Dec 01, 2018 at 03:12:56AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> kernel/cgroup/cpuset.c: In function 'cpuset_cancel_attach':
> kernel/cgroup/cpuset.c:2167:17: warning:
>  variable 'cs' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in commit 1f7dd3e5a6e4 ("cgroup: fix handling
> of multi-destination migration from subtree_control enabling")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied to cgroup/for-4.21.

Thanks.

-- 
tejun

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

end of thread, other threads:[~2018-12-03 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01  3:12 [PATCH -next] cpuset: Remove set but not used variable 'cs' YueHaibing
2018-12-03 16:25 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).