[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181228085804.GR16738@dhcp22.suse.cz>
Date: Fri, 28 Dec 2018 09:58:04 +0100
From: Michal Hocko <mhocko@...nel.org>
To: YueHaibing <yuehaibing@...wei.com>
Cc: Kees Cook <keescook@...omium.org>,
Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>,
Marcos Paulo de Souza <marcos.souza.org@...il.com>,
David Windsor <dave@...lcore.net>,
Roman Gushchin <guro@...com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Rik van Riel <riel@...riel.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
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@...wei.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
Powered by blists - more mailing lists