Re: [PATCH] x86/vdso: add mremap hook to vm_special_mapping

From: Dmitry Safonov
Date: Mon Apr 11 2016 - 11:55:42 EST


On 04/11/2016 06:41 PM, kbuild test robot wrote:
Hi Dmitry,

[auto build test WARNING on v4.6-rc3]
[also build test WARNING on next-20160411]
[cannot apply to tip/x86/vdso luto/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/x86-vdso-add-mremap-hook-to-vm_special_mapping/20160411-232653
config: x86_64-randconfig-x000-201615 (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

arch/x86/entry/vdso/vma.c: In function 'vdso_mremap':
arch/x86/entry/vdso/vma.c:105:18: warning: unused variable 'regs' [-Wunused-variable]
struct pt_regs *regs = current_pt_regs();
^
Thanks, it should go with this:
--->8---
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 08ac59907cde..7e261e2554c8 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -102,7 +102,7 @@ static int vdso_fault(const struct vm_special_mapping *sm,
static int vdso_mremap(const struct vm_special_mapping *sm,
struct vm_area_struct *new_vma)
{
- struct pt_regs *regs = current_pt_regs();
+ struct pt_regs __maybe_unused *regs = current_pt_regs();

#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
/* Fixing userspace landing - look at do_fast_syscall_32 */