Skip to content

Commit 3144013

Browse files
btw616richardweinberger
authored andcommitted
um: Fix the -Wmissing-prototypes warning for get_thread_reg
The get_thread_reg function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: dbba7f7 ("um: stop polluting the namespace with registers.h contents") Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 2cbade1 commit 3144013

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

arch/um/include/asm/processor-generic.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ extern struct cpuinfo_um boot_cpu_data;
9494
#define current_cpu_data boot_cpu_data
9595
#define cache_line_size() (boot_cpu_data.cache_alignment)
9696

97-
extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
9897
#define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
9998
extern unsigned long __get_wchan(struct task_struct *p);
10099

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __X86_UM_SYSDEP_ARCHSETJMP_H
3+
#define __X86_UM_SYSDEP_ARCHSETJMP_H
4+
25
#ifdef __i386__
36
#include "archsetjmp_32.h"
47
#else
58
#include "archsetjmp_64.h"
69
#endif
10+
11+
unsigned long get_thread_reg(int reg, jmp_buf *buf);
12+
13+
#endif /* __X86_UM_SYSDEP_ARCHSETJMP_H */

0 commit comments

Comments
 (0)