Skip to content

Commit fb5bf31

Browse files
Yi Wangtorvalds
authored andcommitted
fork: fix some -Wmissing-prototypes warnings
We get a warning when building kernel with W=1: kernel/fork.c:167:13: warning: no previous prototype for `arch_release_thread_stack' [-Wmissing-prototypes] kernel/fork.c:779:13: warning: no previous prototype for `fork_init' [-Wmissing-prototypes] Add the missing declaration in head file to fix this. Also, remove arch_release_thread_stack() completely because no arch seems to implement it since bb9d812 (arch: remove tile port). Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Yi Wang <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Mike Rapoport <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 306790f commit fb5bf31

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

include/linux/sched/task.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ void __noreturn do_task_dead(void);
3939

4040
extern void proc_caches_init(void);
4141

42+
extern void fork_init(void);
43+
4244
extern void release_task(struct task_struct * p);
4345

4446
#ifdef CONFIG_HAVE_COPY_THREAD_TLS

init/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
static int kernel_init(void *);
106106

107107
extern void init_IRQ(void);
108-
extern void fork_init(void);
109108
extern void radix_tree_init(void);
110109

111110
/*

kernel/fork.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ static inline void free_task_struct(struct task_struct *tsk)
164164
}
165165
#endif
166166

167-
void __weak arch_release_thread_stack(unsigned long *stack)
168-
{
169-
}
170-
171167
#ifndef CONFIG_ARCH_THREAD_STACK_ALLOCATOR
172168

173169
/*
@@ -422,7 +418,6 @@ static void release_task_stack(struct task_struct *tsk)
422418
return; /* Better to leak the stack than to free prematurely */
423419

424420
account_kernel_stack(tsk, -1);
425-
arch_release_thread_stack(tsk->stack);
426421
free_thread_stack(tsk);
427422
tsk->stack = NULL;
428423
#ifdef CONFIG_VMAP_STACK

0 commit comments

Comments
 (0)