Skip to content

Commit 2cbade1

Browse files
btw616richardweinberger
authored andcommitted
um: Fix the -Wmissing-prototypes warning for __switch_mm
The __switch_mm function is defined in the user code, and is called by the kernel code. It should be declared in a shared header. Fixes: 4dc706c ("um: take um_mmu.h to asm/mmu.h, clean asm/mmu_context.h a bit") Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 323ced9 commit 2cbade1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/um/include/asm/mmu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ typedef struct mm_context {
1414
struct uml_arch_mm_context arch;
1515
} mm_context_t;
1616

17-
extern void __switch_mm(struct mm_id * mm_idp);
18-
1917
/* Avoid tangled inclusion with asm/ldt.h */
2018
extern long init_new_ldt(struct mm_context *to_mm, struct mm_context *from_mm);
2119
extern void free_ldt(struct mm_context *mm);

arch/um/include/shared/skas/mm_id.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ struct mm_id {
1515
int kill;
1616
};
1717

18+
void __switch_mm(struct mm_id *mm_idp);
19+
1820
#endif

0 commit comments

Comments
 (0)