Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754492AbcK1HhW (ORCPT ); Mon, 28 Nov 2016 02:37:22 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34138 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754447AbcK1HhN (ORCPT ); Mon, 28 Nov 2016 02:37:13 -0500 Date: Mon, 28 Nov 2016 08:37:09 +0100 From: Michal Hocko To: Zefan Li Cc: Arnd Bergmann , Kirtika Ruchandani , tj@kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable Message-ID: <20161128073709.GA14835@dhcp22.suse.cz> References: <1480049712-17224-1-git-send-email-kirtika@chromium.org> <5837D01C.1070803@huawei.com> <4410043.lxDXIbV3iK@wuerfel> <5838DA80.6040208@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5838DA80.6040208@huawei.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1729 Lines: 38 On Sat 26-11-16 08:42:40, Li Zefan wrote: > On 2016/11/25 17:46, Arnd Bergmann wrote: > > 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. > > > > People like stable tree maintainers use scripts to find out bug fixes > that needs to be backported to older kernels, and those scripts tracks > the Fixes tag. No doubt this patch doesn't require backporting, so > it's better avoid using this tag. I would disagree here. Randomly picking up fixes just because they are Fixing some commit is just too dangerous for the stable trees. Fixes tag should tell what was the culprit of the issue fixed by the patch, nothing more and nothing less. -- Michal Hocko SUSE Labs