All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-25  4:55 Kirtika Ruchandani
  2016-11-25  5:46   ` Zefan Li
  2016-11-28 21:07 ` Tejun Heo
  0 siblings, 2 replies; 12+ messages in thread
From: Kirtika Ruchandani @ 2016-11-25  4:55 UTC (permalink / raw)
  To: tj, Li Zefan; +Cc: Kirtika Ruchandani, arnd, cgroups, linux-kernel

'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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-25  5:46   ` Zefan Li
  0 siblings, 0 replies; 12+ messages in thread
From: Zefan Li @ 2016-11-25  5:46 UTC (permalink / raw)
  To: Kirtika Ruchandani, tj; +Cc: arnd, cgroups, linux-kernel

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 <tj@kernel.org>
> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>

Acked-by: Zefan Li <lizefan@huawei.com>

> ---
>  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--;
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-25  5:46   ` Zefan Li
  0 siblings, 0 replies; 12+ messages in thread
From: Zefan Li @ 2016-11-25  5:46 UTC (permalink / raw)
  To: Kirtika Ruchandani, tj-DgEjT+Ai2ygdnm+yROfE0A
  Cc: arnd-r2nGTMty4D4, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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 <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Signed-off-by: Kirtika Ruchandani <kirtika-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

Acked-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.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--;
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-25  9:46     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2016-11-25  9:46 UTC (permalink / raw)
  To: Zefan Li; +Cc: Kirtika Ruchandani, tj, cgroups, linux-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-25  9:46     ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2016-11-25  9:46 UTC (permalink / raw)
  To: Zefan Li
  Cc: Kirtika Ruchandani, tj-DgEjT+Ai2ygdnm+yROfE0A,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
  2016-11-25  9:46     ` Arnd Bergmann
@ 2016-11-26  0:42       ` Zefan Li
  -1 siblings, 0 replies; 12+ messages in thread
From: Zefan Li @ 2016-11-26  0:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Kirtika Ruchandani, tj, cgroups, linux-kernel

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-26  0:42       ` Zefan Li
  0 siblings, 0 replies; 12+ messages in thread
From: Zefan Li @ 2016-11-26  0:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kirtika Ruchandani, tj-DgEjT+Ai2ygdnm+yROfE0A,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-28  7:37         ` Michal Hocko
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Hocko @ 2016-11-28  7:37 UTC (permalink / raw)
  To: Zefan Li; +Cc: Arnd Bergmann, Kirtika Ruchandani, tj, cgroups, linux-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-28  7:37         ` Michal Hocko
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Hocko @ 2016-11-28  7:37 UTC (permalink / raw)
  To: Zefan Li
  Cc: Arnd Bergmann, Kirtika Ruchandani, tj-DgEjT+Ai2ygdnm+yROfE0A,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-28 20:53           ` Tejun Heo
  0 siblings, 0 replies; 12+ messages in thread
From: Tejun Heo @ 2016-11-28 20:53 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Zefan Li, Arnd Bergmann, Kirtika Ruchandani, cgroups, linux-kernel

Hello,

On Mon, Nov 28, 2016 at 08:37:09AM +0100, Michal Hocko wrote:
> 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.

Logically, I agree but then the only time I used the Fixes tag is when
I was tagging patches for stable and I can imagine people grepping for
the tag to backport.  Also, given that the offending commit is already
referenced in the description, the tag doesn't make much difference to
human beings.  I don't think it's a big deal either way but am more
inclined to follow Li's suggestion here given that he is maintaining
stable trees.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
@ 2016-11-28 20:53           ` Tejun Heo
  0 siblings, 0 replies; 12+ messages in thread
From: Tejun Heo @ 2016-11-28 20:53 UTC (permalink / raw)
  To: Michal Hocko
  Cc: Zefan Li, Arnd Bergmann, Kirtika Ruchandani,
	cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hello,

On Mon, Nov 28, 2016 at 08:37:09AM +0100, Michal Hocko wrote:
> 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.

Logically, I agree but then the only time I used the Fixes tag is when
I was tagging patches for stable and I can imagine people grepping for
the tag to backport.  Also, given that the offending commit is already
referenced in the description, the tag doesn't make much difference to
human beings.  I don't think it's a big deal either way but am more
inclined to follow Li's suggestion here given that he is maintaining
stable trees.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable
  2016-11-25  4:55 [PATCH] cpuset: Remove unused 'struct cpuset*' variable Kirtika Ruchandani
  2016-11-25  5:46   ` Zefan Li
@ 2016-11-28 21:07 ` Tejun Heo
  1 sibling, 0 replies; 12+ messages in thread
From: Tejun Heo @ 2016-11-28 21:07 UTC (permalink / raw)
  To: Kirtika Ruchandani; +Cc: Li Zefan, arnd, cgroups, linux-kernel

On Thu, Nov 24, 2016 at 08:55:12PM -0800, 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").
> Cc: Tejun Heo <tj@kernel.org>
> Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>

Applied to cgroup/for-4.10.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-11-28 21:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-25  4:55 [PATCH] cpuset: Remove unused 'struct cpuset*' variable Kirtika Ruchandani
2016-11-25  5:46 ` Zefan Li
2016-11-25  5:46   ` Zefan Li
2016-11-25  9:46   ` Arnd Bergmann
2016-11-25  9:46     ` Arnd Bergmann
2016-11-26  0:42     ` Zefan Li
2016-11-26  0:42       ` Zefan Li
2016-11-28  7:37       ` Michal Hocko
2016-11-28  7:37         ` Michal Hocko
2016-11-28 20:53         ` Tejun Heo
2016-11-28 20:53           ` Tejun Heo
2016-11-28 21:07 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.