From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable Date: Fri, 25 Nov 2016 10:46:08 +0100 Message-ID: <4410043.lxDXIbV3iK@wuerfel> References: <1480049712-17224-1-git-send-email-kirtika@chromium.org> <5837D01C.1070803@huawei.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <5837D01C.1070803-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8" To: Zefan Li Cc: Kirtika Ruchandani , tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Friday, November 25, 2016 1:46:04 PM CET Zefan Li wrote: > 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. I think it's ok since the changelog makes it clear that the warning is harmless. It's still useful information to know what commit introduced the warning, and the warning is fixed by this patch. Arnd