From: Michal Hocko <mhocko@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Kees Cook <keescook@chromium.org>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>,
Marcos Paulo de Souza <marcos.souza.org@gmail.com>,
David Windsor <dave@nullcore.net>, Roman Gushchin <guro@fb.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Rik van Riel <riel@surriel.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused
Date: Fri, 28 Dec 2018 09:58:04 +0100 [thread overview]
Message-ID: <20181228085804.GR16738@dhcp22.suse.cz> (raw)
In-Reply-To: <1545965190-2381-1-git-send-email-yuehaibing@huawei.com>
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
next prev parent reply other threads:[~2018-12-28 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 2:46 [PATCH -next] mm: Mark 'stack_vm_area' with __maybe_unused YueHaibing
2018-12-28 8:58 ` Michal Hocko [this message]
2019-01-02 10:55 ` Dan Carpenter
2019-01-02 11:40 ` YueHaibing
2019-01-03 15:32 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181228085804.GR16738@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dave@nullcore.net \
--cc=ebiederm@xmission.com \
--cc=guro@fb.com \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=marcos.souza.org@gmail.com \
--cc=riel@surriel.com \
--cc=wad@chromium.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox