All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2018-12-28  2:46 ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-12-28  2:46 UTC (permalink / raw)
  To: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Michal Hocko,
	Eric W. Biederman, Rik van Riel
  Cc: YueHaibing, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning when
CONFIG_VMAP_STACK is not set:

kernel/fork.c: In function 'dup_task_struct':
kernel/fork.c:843:20: warning:
 variable 'stack_vm_area' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index e2a5156..b38c392 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -840,7 +840,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
 {
 	struct task_struct *tsk;
 	unsigned long *stack;
-	struct vm_struct *stack_vm_area;
+	struct vm_struct *stack_vm_area __maybe_unused;
 	int err;
 
 	if (node == NUMA_NO_NODE)




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

* [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2018-12-28  2:46 ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2018-12-28  2:46 UTC (permalink / raw)
  To: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Michal Hocko,
	Eric W. Biederman, Rik van Riel
  Cc: YueHaibing, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning when
CONFIG_VMAP_STACK is not set:

kernel/fork.c: In function 'dup_task_struct':
kernel/fork.c:843:20: warning:
 variable 'stack_vm_area' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index e2a5156..b38c392 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -840,7 +840,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
 {
 	struct task_struct *tsk;
 	unsigned long *stack;
-	struct vm_struct *stack_vm_area;
+	struct vm_struct *stack_vm_area __maybe_unused;
 	int err;
 
 	if (node = NUMA_NO_NODE)

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
  2018-12-28  2:46 ` YueHaibing
@ 2018-12-28  8:58   ` Michal Hocko
  -1 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2018-12-28  8:58 UTC (permalink / raw)
  To: YueHaibing
  Cc: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Eric W. Biederman,
	Rik van Riel, linux-kernel, kernel-janitors

On Fri 28-12-18 02:46:30, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning when
> CONFIG_VMAP_STACK is not set:

Isn't this warning disabled? I can see the following
# These warnings generated too much noise in a regular build.
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
KBUILD_CFLAGS += -Wno-unused-but-set-variable

in the main makefile. IMHO this warning doesn't really give us much.

> 
> kernel/fork.c: In function 'dup_task_struct':
> kernel/fork.c:843:20: warning:
>  variable 'stack_vm_area' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  kernel/fork.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index e2a5156..b38c392 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -840,7 +840,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
>  {
>  	struct task_struct *tsk;
>  	unsigned long *stack;
> -	struct vm_struct *stack_vm_area;
> +	struct vm_struct *stack_vm_area __maybe_unused;
>  	int err;
>  
>  	if (node == NUMA_NO_NODE)
> 
> 
> 

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2018-12-28  8:58   ` Michal Hocko
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2018-12-28  8:58 UTC (permalink / raw)
  To: YueHaibing
  Cc: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Eric W. Biederman,
	Rik van Riel, linux-kernel, kernel-janitors

On Fri 28-12-18 02:46:30, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning when
> CONFIG_VMAP_STACK is not set:

Isn't this warning disabled? I can see the following
# These warnings generated too much noise in a regular build.
# Use make W=1 to enable them (see scripts/Makefile.extrawarn)
KBUILD_CFLAGS += -Wno-unused-but-set-variable

in the main makefile. IMHO this warning doesn't really give us much.

> 
> kernel/fork.c: In function 'dup_task_struct':
> kernel/fork.c:843:20: warning:
>  variable 'stack_vm_area' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  kernel/fork.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/fork.c b/kernel/fork.c
> index e2a5156..b38c392 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -840,7 +840,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
>  {
>  	struct task_struct *tsk;
>  	unsigned long *stack;
> -	struct vm_struct *stack_vm_area;
> +	struct vm_struct *stack_vm_area __maybe_unused;
>  	int err;
>  
>  	if (node = NUMA_NO_NODE)
> 
> 
> 

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
  2018-12-28  8:58   ` Michal Hocko
@ 2019-01-02 10:55     ` Dan Carpenter
  -1 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2019-01-02 10:55 UTC (permalink / raw)
  To: Michal Hocko
  Cc: YueHaibing, Kees Cook, Andy Lutomirski, Will Drewry,
	Marcos Paulo de Souza, David Windsor, Roman Gushchin,
	Andrew Morton, Eric W. Biederman, Rik van Riel, linux-kernel,
	kernel-janitors

On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
> On Fri 28-12-18 02:46:30, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning when
> > CONFIG_VMAP_STACK is not set:
> 
> Isn't this warning disabled? I can see the following
> # These warnings generated too much noise in a regular build.
> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
> KBUILD_CFLAGS += -Wno-unused-but-set-variable
> 
> in the main makefile. IMHO this warning doesn't really give us much.
> 

It would be nice to enable that warning.  YueHaibing and Colin King have
been whittling away at the problematic code...

YueHaibing, how many of these warnings do we have remaining on an
allmodoconfig?

regards,
dan carpenter


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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2019-01-02 10:55     ` Dan Carpenter
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Carpenter @ 2019-01-02 10:55 UTC (permalink / raw)
  To: Michal Hocko
  Cc: YueHaibing, Kees Cook, Andy Lutomirski, Will Drewry,
	Marcos Paulo de Souza, David Windsor, Roman Gushchin,
	Andrew Morton, Eric W. Biederman, Rik van Riel, linux-kernel,
	kernel-janitors

On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
> On Fri 28-12-18 02:46:30, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning when
> > CONFIG_VMAP_STACK is not set:
> 
> Isn't this warning disabled? I can see the following
> # These warnings generated too much noise in a regular build.
> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
> KBUILD_CFLAGS += -Wno-unused-but-set-variable
> 
> in the main makefile. IMHO this warning doesn't really give us much.
> 

It would be nice to enable that warning.  YueHaibing and Colin King have
been whittling away at the problematic code...

YueHaibing, how many of these warnings do we have remaining on an
allmodoconfig?

regards,
dan carpenter

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
  2019-01-02 10:55     ` Dan Carpenter
@ 2019-01-02 11:40       ` YueHaibing
  -1 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2019-01-02 11:40 UTC (permalink / raw)
  To: Dan Carpenter, Michal Hocko
  Cc: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Eric W. Biederman,
	Rik van Riel, linux-kernel, kernel-janitors

On 2019/1/2 18:55, Dan Carpenter wrote:
> On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
>> On Fri 28-12-18 02:46:30, YueHaibing wrote:
>>> Fixes gcc '-Wunused-but-set-variable' warning when
>>> CONFIG_VMAP_STACK is not set:
>>
>> Isn't this warning disabled? I can see the following
>> # These warnings generated too much noise in a regular build.
>> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
>> KBUILD_CFLAGS += -Wno-unused-but-set-variable
>>
>> in the main makefile. IMHO this warning doesn't really give us much.
>>
> 
> It would be nice to enable that warning.  YueHaibing and Colin King have
> been whittling away at the problematic code...
> 
> YueHaibing, how many of these warnings do we have remaining on an
> allmodoconfig?

about 1300+

> 
> regards,
> dan carpenter
> 
> 
> .
> 


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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2019-01-02 11:40       ` YueHaibing
  0 siblings, 0 replies; 10+ messages in thread
From: YueHaibing @ 2019-01-02 11:40 UTC (permalink / raw)
  To: Dan Carpenter, Michal Hocko
  Cc: Kees Cook, Andy Lutomirski, Will Drewry, Marcos Paulo de Souza,
	David Windsor, Roman Gushchin, Andrew Morton, Eric W. Biederman,
	Rik van Riel, linux-kernel, kernel-janitors

On 2019/1/2 18:55, Dan Carpenter wrote:
> On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
>> On Fri 28-12-18 02:46:30, YueHaibing wrote:
>>> Fixes gcc '-Wunused-but-set-variable' warning when
>>> CONFIG_VMAP_STACK is not set:
>>
>> Isn't this warning disabled? I can see the following
>> # These warnings generated too much noise in a regular build.
>> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
>> KBUILD_CFLAGS += -Wno-unused-but-set-variable
>>
>> in the main makefile. IMHO this warning doesn't really give us much.
>>
> 
> It would be nice to enable that warning.  YueHaibing and Colin King have
> been whittling away at the problematic code...
> 
> YueHaibing, how many of these warnings do we have remaining on an
> allmodoconfig?

about 1300+

> 
> regards,
> dan carpenter
> 
> 
> .
> 

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
  2019-01-02 11:40       ` YueHaibing
@ 2019-01-03 15:32         ` Michal Hocko
  -1 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2019-01-03 15:32 UTC (permalink / raw)
  To: YueHaibing
  Cc: Dan Carpenter, Kees Cook, Andy Lutomirski, Will Drewry,
	Marcos Paulo de Souza, David Windsor, Roman Gushchin,
	Andrew Morton, Eric W. Biederman, Rik van Riel, linux-kernel,
	kernel-janitors

On Wed 02-01-19 19:40:15, YueHaibing wrote:
> On 2019/1/2 18:55, Dan Carpenter wrote:
> > On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
> >> On Fri 28-12-18 02:46:30, YueHaibing wrote:
> >>> Fixes gcc '-Wunused-but-set-variable' warning when
> >>> CONFIG_VMAP_STACK is not set:
> >>
> >> Isn't this warning disabled? I can see the following
> >> # These warnings generated too much noise in a regular build.
> >> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
> >> KBUILD_CFLAGS += -Wno-unused-but-set-variable
> >>
> >> in the main makefile. IMHO this warning doesn't really give us much.
> >>
> > 
> > It would be nice to enable that warning.  YueHaibing and Colin King have
> > been whittling away at the problematic code...
> > 
> > YueHaibing, how many of these warnings do we have remaining on an
> > allmodoconfig?
> 
> about 1300+

This is way too much. Is any of them actually pointing to a real bug?

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
@ 2019-01-03 15:32         ` Michal Hocko
  0 siblings, 0 replies; 10+ messages in thread
From: Michal Hocko @ 2019-01-03 15:32 UTC (permalink / raw)
  To: YueHaibing
  Cc: Dan Carpenter, Kees Cook, Andy Lutomirski, Will Drewry,
	Marcos Paulo de Souza, David Windsor, Roman Gushchin,
	Andrew Morton, Eric W. Biederman, Rik van Riel, linux-kernel,
	kernel-janitors

On Wed 02-01-19 19:40:15, YueHaibing wrote:
> On 2019/1/2 18:55, Dan Carpenter wrote:
> > On Fri, Dec 28, 2018 at 09:58:04AM +0100, Michal Hocko wrote:
> >> On Fri 28-12-18 02:46:30, YueHaibing wrote:
> >>> Fixes gcc '-Wunused-but-set-variable' warning when
> >>> CONFIG_VMAP_STACK is not set:
> >>
> >> Isn't this warning disabled? I can see the following
> >> # These warnings generated too much noise in a regular build.
> >> # Use make W=1 to enable them (see scripts/Makefile.extrawarn)
> >> KBUILD_CFLAGS += -Wno-unused-but-set-variable
> >>
> >> in the main makefile. IMHO this warning doesn't really give us much.
> >>
> > 
> > It would be nice to enable that warning.  YueHaibing and Colin King have
> > been whittling away at the problematic code...
> > 
> > YueHaibing, how many of these warnings do we have remaining on an
> > allmodoconfig?
> 
> about 1300+

This is way too much. Is any of them actually pointing to a real bug?

-- 
Michal Hocko
SUSE Labs

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

end of thread, other threads:[~2019-01-03 15:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28  2:46 [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused YueHaibing
2018-12-28  2:46 ` YueHaibing
2018-12-28  8:58 ` Michal Hocko
2018-12-28  8:58   ` Michal Hocko
2019-01-02 10:55   ` Dan Carpenter
2019-01-02 10:55     ` Dan Carpenter
2019-01-02 11:40     ` YueHaibing
2019-01-02 11:40       ` YueHaibing
2019-01-03 15:32       ` Michal Hocko
2019-01-03 15:32         ` Michal Hocko

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.