Skip to content

Commit b5e0950

Browse files
btw616richardweinberger
authored andcommitted
um: Remove unused functions
These functions are not used anymore. Removing them will also address below -Wmissing-prototypes warnings: arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_user_proc’ [-Wmissing-prototypes] arch/um/kernel/process.c:263:5: warning: no previous prototype for ‘clear_user_proc’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 0c2b208 commit b5e0950

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

arch/um/kernel/process.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,6 @@ static inline int external_pid(void)
4848
return userspace_pid[0];
4949
}
5050

51-
int pid_to_processor_id(int pid)
52-
{
53-
int i;
54-
55-
for (i = 0; i < ncpus; i++) {
56-
if (cpu_tasks[i].pid == pid)
57-
return i;
58-
}
59-
return -1;
60-
}
61-
6251
void free_stack(unsigned long stack, int order)
6352
{
6453
free_pages(stack, order);
@@ -250,21 +239,11 @@ char *uml_strdup(const char *string)
250239
}
251240
EXPORT_SYMBOL(uml_strdup);
252241

253-
int copy_to_user_proc(void __user *to, void *from, int size)
254-
{
255-
return copy_to_user(to, from, size);
256-
}
257-
258242
int copy_from_user_proc(void *to, void __user *from, int size)
259243
{
260244
return copy_from_user(to, from, size);
261245
}
262246

263-
int clear_user_proc(void __user *buf, int size)
264-
{
265-
return clear_user(buf, size);
266-
}
267-
268247
static atomic_t using_sysemu = ATOMIC_INIT(0);
269248
int sysemu_supported;
270249

arch/um/kernel/tlb.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,6 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
576576
}
577577
EXPORT_SYMBOL(flush_tlb_range);
578578

579-
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
580-
unsigned long end)
581-
{
582-
fix_range(mm, start, end, 0);
583-
}
584-
585579
void flush_tlb_mm(struct mm_struct *mm)
586580
{
587581
struct vm_area_struct *vma;

0 commit comments

Comments
 (0)