Skip to content

Commit 470dbef

Browse files
btw616richardweinberger
authored andcommitted
um: Remove unused do_get_thread_area function
It's not used since it was introduced by commit aa6758d ("[PATCH] uml: implement {get,set}_thread_area for i386"). Now, it's causing a -Wmissing-prototypes warning: arch/x86/um/tls_32.c:39:5: warning: no previous prototype for ‘do_get_thread_area’ [-Wmissing-prototypes] 39 | int do_get_thread_area(struct user_desc *info) | ^~~~~~~~~~~~~~~~~~ The original author also had doubts about whether it should be used. Considering that 18 years have passed, let's just remove it. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 67c3c7d commit 470dbef

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

arch/x86/um/tls_32.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ static int do_set_thread_area(struct user_desc *info)
3636
return ret;
3737
}
3838

39-
int do_get_thread_area(struct user_desc *info)
40-
{
41-
int ret;
42-
u32 cpu;
43-
44-
cpu = get_cpu();
45-
ret = os_get_thread_area(info, userspace_pid[cpu]);
46-
put_cpu();
47-
48-
if (ret)
49-
printk(KERN_ERR "PTRACE_GET_THREAD_AREA failed, err = %d, "
50-
"index = %d\n", ret, info->entry_number);
51-
52-
return ret;
53-
}
54-
5539
/*
5640
* sys_get_thread_area: get a yet unused TLS descriptor index.
5741
* XXX: Consider leaving one free slot for glibc usage at first place. This must
@@ -231,7 +215,6 @@ int arch_set_tls(struct task_struct *new, unsigned long tls)
231215
return ret;
232216
}
233217

234-
/* XXX: use do_get_thread_area to read the host value? I'm not at all sure! */
235218
static int get_tls_entry(struct task_struct *task, struct user_desc *info,
236219
int idx)
237220
{

0 commit comments

Comments
 (0)