Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752913AbcKZAmz (ORCPT ); Fri, 25 Nov 2016 19:42:55 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:20106 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbcKZAmy (ORCPT ); Fri, 25 Nov 2016 19:42:54 -0500 Subject: Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable To: Arnd Bergmann References: <1480049712-17224-1-git-send-email-kirtika@chromium.org> <5837D01C.1070803@huawei.com> <4410043.lxDXIbV3iK@wuerfel> CC: Kirtika Ruchandani , , , From: Zefan Li X-Enigmail-Draft-Status: N1110 Message-ID: <5838DA80.6040208@huawei.com> Date: Sat, 26 Nov 2016 08:42:40 +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: <4410043.lxDXIbV3iK@wuerfel> 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: 1361 Lines: 28 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.