um: Fix the return type of __switch_to
authorTiwei Bie <tiwei.btw@antgroup.com>
Wed, 6 Mar 2024 10:19:20 +0000 (18:19 +0800)
committerRichard Weinberger <richard@nod.at>
Mon, 22 Apr 2024 19:45:41 +0000 (21:45 +0200)
Make it match the declaration in asm-generic/switch_to.h. And
also include the header to allow the compiler to check it.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/process.c

index 292c8014aaa65b8fbca6ce7c48ab4ac454701d89..a7607ef1b02f34e706535e38d640e086668f3fbc 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/resume_user_mode.h>
 #include <asm/current.h>
 #include <asm/mmu_context.h>
+#include <asm/switch_to.h>
 #include <linux/uaccess.h>
 #include <as-layout.h>
 #include <kern_util.h>
@@ -73,7 +74,7 @@ static inline void set_current(struct task_struct *task)
 
 extern void arch_switch_to(struct task_struct *to);
 
-void *__switch_to(struct task_struct *from, struct task_struct *to)
+struct task_struct *__switch_to(struct task_struct *from, struct task_struct *to)
 {
        to->thread.prev_sched = from;
        set_current(to);