linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kirtika Ruchandani <kirtika@chromium.org>
To: tj@kernel.org, Li Zefan <lizefan@huawei.com>
Cc: Kirtika Ruchandani <kirtika@chromium.org>,
	arnd@arndb.de, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
Date: Thu, 24 Nov 2016 20:55:12 -0800	[thread overview]
Message-ID: <1480049712-17224-1-git-send-email-kirtika@chromium.org> (raw)
In-Reply-To: <kirtika@chromium.org>

'struct cpuset* cs' that is set but not used, was introduced in commit
1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from subtree_control enabling").
cpuset_cancel_attach() uses css_cs(css) instead. Compiling with W=1
gives the folllowing harmless warning, which we'd like to fix to
reduce the noise with W=1 in the kernel.

kernel/cpuset.c: In function ‘cpuset_cancel_attach’:
kernel/cpuset.c:1502:17: warning: variable ‘cs’ set but not used [-Wunused-but-set-variable]
  struct cpuset *cs;
                 ^

Fixes: 1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from subtree_control enabling").
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
---
 kernel/cpuset.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 29f815d..af51460 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1499,10 +1499,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--;
-- 
2.8.0.rc3.226.g39d4020

             reply	other threads:[~2016-11-25  4:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25  4:55 Kirtika Ruchandani [this message]
2016-11-25  5:46 ` [PATCH] cpuset: Remove unused 'struct cpuset*' variable Zefan Li
2016-11-25  9:46   ` Arnd Bergmann
2016-11-26  0:42     ` Zefan Li
2016-11-28  7:37       ` Michal Hocko
2016-11-28 20:53         ` Tejun Heo
2016-11-28 21:07 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480049712-17224-1-git-send-email-kirtika@chromium.org \
    --to=kirtika@chromium.org \
    --cc=arnd@arndb.de \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).