Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752710AbcKYFtx (ORCPT ); Fri, 25 Nov 2016 00:49:53 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:60288 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752550AbcKYFtv (ORCPT ); Fri, 25 Nov 2016 00:49:51 -0500 Subject: Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable To: Kirtika Ruchandani , References: <1480049712-17224-1-git-send-email-kirtika@chromium.org> CC: , , From: Zefan Li Message-ID: <5837D01C.1070803@huawei.com> Date: Fri, 25 Nov 2016 13:46:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1480049712-17224-1-git-send-email-kirtika@chromium.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 41 On 2016/11/25 12:55, Kirtika Ruchandani wrote: > '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"). This isn't a bug, so I don't think this tag is proper. > Cc: Tejun Heo > Signed-off-by: Kirtika Ruchandani Acked-by: Zefan Li > --- > 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--; >