From: YueHaibing Date: Fri, 28 Dec 2018 08:40:00 +0000 (-0800) Subject: kernel/fork.c: mark 'stack_vm_area' with __maybe_unused X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0f4991e8fd48987ae476a92cdee6bfec4aff31b8;p=openwrt%2Fstaging%2Fblogic.git kernel/fork.c: mark 'stack_vm_area' with __maybe_unused 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] Link: http://lkml.kernel.org/r/1545965190-2381-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/fork.c b/kernel/fork.c index c979605fe806..d439c48ecf18 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -841,7 +841,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)