[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211005164827.103876-1-avagin@gmail.com>
Date: Tue, 5 Oct 2021 09:48:27 -0700
From: Andrei Vagin <avagin@...il.com>
To: linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Andrei Vagin <avagin@...il.com>,
Dmitry Safonov <0x7f454c46@...il.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] x86: move arch_get_vdso_data under CONFIG_TIME_NS
This patch fixes the warning:
>> vma.c:32:19: warning: no previous prototype for 'arch_get_vdso_data'
32 | struct vdso_data *arch_get_vdso_data(void *vvar_page)
| ^~~~~~~~~~~~~~~~~~
Cc: Dmitry Safonov <0x7f454c46@...il.com>
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Andrei Vagin <avagin@...il.com>
---
arch/x86/entry/vdso/vma.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 235a5794296a..427bc56c152b 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -31,11 +31,6 @@
#define EMIT_VVAR(name, offset) \
const size_t name ## _offset = offset;
#include <asm/vvar.h>
-
-struct vdso_data *arch_get_vdso_data(void *vvar_page)
-{
- return (struct vdso_data *)(vvar_page + _vdso_data_offset);
-}
#undef EMIT_VVAR
unsigned int vclocks_used __read_mostly;
@@ -98,6 +93,11 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
}
#ifdef CONFIG_TIME_NS
+struct vdso_data *arch_get_vdso_data(void *vvar_page)
+{
+ return (struct vdso_data *)(vvar_page + _vdso_data_offset);
+}
+
static struct page *find_timens_vvar_page(struct vm_area_struct *vma)
{
if (likely(vma->vm_mm == current->mm))
--
2.31.1
Powered by blists - more mailing lists