Skip to content

Commit 0734f5c

Browse files
committed
Merge branch 'asm-generic-prototypes' into asm-generic
As part of my quest to enable -Wmissing-prototypes by default, these patches clean up some of the prototypes that are needed by all architectures but are handled inconsistently. The duplicate prototypes are moved into common code, which helps both to clean up the existing warnings and simplifies the logic. * asm-generic-prototypes: arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes csky: fix arch_jump_label_transform_static override arch: add do_page_fault prototypes arch: add missing prepare_ftrace_return() prototypes arch: vdso: consolidate gettime prototypes arch: include linux/cpu.h for trap_init() prototype arch: fix asm-offsets.c building with -Wmissing-prototypes arch: consolidate arch_irq_work_raise prototypes
2 parents d67a308 + 7192ad2 commit 0734f5c

39 files changed

Lines changed: 85 additions & 72 deletions

File tree

arch/alpha/include/asm/mmu_context.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ ev4_switch_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm,
183183
}
184184

185185
extern void __load_new_mm_context(struct mm_struct *);
186+
asmlinkage void do_page_fault(unsigned long address, unsigned long mmcsr,
187+
long cause, struct pt_regs *regs);
186188

187189
#ifdef CONFIG_SMP
188190
#define check_mmu_context() \

arch/alpha/kernel/asm-offsets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <linux/kbuild.h>
1313
#include <asm/io.h>
1414

15-
void foo(void)
15+
static void __used foo(void)
1616
{
1717
DEFINE(TI_TASK, offsetof(struct thread_info, task));
1818
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));

arch/alpha/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* This file initializes the trap entry points
1010
*/
1111

12+
#include <linux/cpu.h>
1213
#include <linux/jiffies.h>
1314
#include <linux/mm.h>
1415
#include <linux/sched/signal.h>

arch/arm/include/asm/irq_work.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ static inline bool arch_irq_work_has_interrupt(void)
99
return is_smp();
1010
}
1111

12-
extern void arch_irq_work_raise(void);
13-
1412
#endif /* _ASM_ARM_IRQ_WORK_H */

arch/arm/include/asm/vdso.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ static inline void arm_install_vdso(struct mm_struct *mm, unsigned long addr)
2424

2525
#endif /* CONFIG_VDSO */
2626

27-
int __vdso_clock_gettime(clockid_t clock, struct old_timespec32 *ts);
28-
int __vdso_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts);
29-
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
30-
int __vdso_clock_getres(clockid_t clock_id, struct old_timespec32 *res);
31-
3227
#endif /* __ASSEMBLY__ */
3328

3429
#endif /* __KERNEL__ */

arch/arm/vdso/vgettimeofday.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/types.h>
99
#include <asm/vdso.h>
1010
#include <asm/unwind.h>
11+
#include <vdso/gettime.h>
1112

1213
int __vdso_clock_gettime(clockid_t clock,
1314
struct old_timespec32 *ts)

arch/arm64/include/asm/irq_work.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef __ASM_IRQ_WORK_H
33
#define __ASM_IRQ_WORK_H
44

5-
extern void arch_irq_work_raise(void);
6-
75
static inline bool arch_irq_work_has_interrupt(void)
86
{
97
return true;

arch/arm64/kernel/vdso32/vgettimeofday.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Copyright (C) 2018 ARM Limited
66
*
77
*/
8+
#define BUILD_VDSO32_64
9+
#include <vdso/gettime.h>
810

911
int __vdso_clock_gettime(clockid_t clock,
1012
struct old_timespec32 *ts)

arch/csky/include/asm/ftrace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
2626

2727
struct dyn_arch_ftrace {
2828
};
29+
30+
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
31+
unsigned long frame_pointer);
32+
2933
#endif /* !__ASSEMBLY__ */
3034
#endif /* __ASM_CSKY_FTRACE_H */

arch/csky/include/asm/irq_work.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ static inline bool arch_irq_work_has_interrupt(void)
77
{
88
return true;
99
}
10-
extern void arch_irq_work_raise(void);
10+
1111
#endif /* __ASM_CSKY_IRQ_WORK_H */

0 commit comments

Comments
 (0)