Skip to content

Commit c8171a8

Browse files
committed
csky: Fixup -Wmissing-prototypes warning
Cleanup the warnings: arch/csky/kernel/ptrace.c:320:16: error: no previous prototype for 'syscall_trace_enter' [-Werror=missing-prototypes] arch/csky/kernel/ptrace.c:336:17: error: no previous prototype for 'syscall_trace_exit' [-Werror=missing-prototypes] arch/csky/kernel/setup.c:116:34: error: no previous prototype for 'csky_start' [-Werror=missing-prototypes] arch/csky/kernel/signal.c:255:17: error: no previous prototype for 'do_notify_resume' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:150:15: error: no previous prototype for 'do_trap_unknown' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:152:15: error: no previous prototype for 'do_trap_zdiv' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:154:15: error: no previous prototype for 'do_trap_buserr' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:157:17: error: no previous prototype for 'do_trap_misaligned' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:168:17: error: no previous prototype for 'do_trap_bkpt' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:187:17: error: no previous prototype for 'do_trap_illinsn' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:210:17: error: no previous prototype for 'do_trap_fpe' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:220:17: error: no previous prototype for 'do_trap_priv' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:230:17: error: no previous prototype for 'trap_c' [-Werror=missing-prototypes] arch/csky/kernel/traps.c:57:13: error: no previous prototype for 'trap_init' [-Werror=missing-prototypes] arch/csky/kernel/vdso/vgettimeofday.c:12:5: error: no previous prototype for '__vdso_clock_gettime64' [-Werror=missing-prototypes] arch/csky/kernel/vdso/vgettimeofday.c:18:5: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] arch/csky/kernel/vdso/vgettimeofday.c:24:5: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes] arch/csky/kernel/vdso/vgettimeofday.c:6:5: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] arch/csky/mm/fault.c:187:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] Link: https://lore.kernel.org/lkml/20230810141947.1236730-17-arnd@kernel.org/ Reported-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org>
1 parent c1884e1 commit c8171a8

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

arch/csky/include/asm/ptrace.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,7 @@ static inline unsigned long regs_get_register(struct pt_regs *regs,
9696
return *(unsigned long *)((unsigned long)regs + offset);
9797
}
9898

99+
asmlinkage int syscall_trace_enter(struct pt_regs *regs);
100+
asmlinkage void syscall_trace_exit(struct pt_regs *regs);
99101
#endif /* __ASSEMBLY__ */
100102
#endif /* __ASM_CSKY_PTRACE_H */

arch/csky/include/asm/sections.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77

88
extern char _start[];
99

10+
asmlinkage void csky_start(unsigned int unused, void *dtb_start);
11+
1012
#endif /* __ASM_SECTIONS_H */

arch/csky/include/asm/traps.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,19 @@ do { \
4040

4141
void csky_alignment(struct pt_regs *regs);
4242

43+
asmlinkage void do_trap_unknown(struct pt_regs *regs);
44+
asmlinkage void do_trap_zdiv(struct pt_regs *regs);
45+
asmlinkage void do_trap_buserr(struct pt_regs *regs);
46+
asmlinkage void do_trap_misaligned(struct pt_regs *regs);
47+
asmlinkage void do_trap_bkpt(struct pt_regs *regs);
48+
asmlinkage void do_trap_illinsn(struct pt_regs *regs);
49+
asmlinkage void do_trap_fpe(struct pt_regs *regs);
50+
asmlinkage void do_trap_priv(struct pt_regs *regs);
51+
asmlinkage void trap_c(struct pt_regs *regs);
52+
53+
asmlinkage void do_notify_resume(struct pt_regs *regs,
54+
unsigned long thread_info_flags);
55+
56+
void trap_init(void);
57+
4358
#endif /* __ASM_CSKY_TRAPS_H */

arch/csky/kernel/vdso/vgettimeofday.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,35 @@
33
#include <linux/time.h>
44
#include <linux/types.h>
55

6+
extern
7+
int __vdso_clock_gettime(clockid_t clock,
8+
struct old_timespec32 *ts);
69
int __vdso_clock_gettime(clockid_t clock,
710
struct old_timespec32 *ts)
811
{
912
return __cvdso_clock_gettime32(clock, ts);
1013
}
1114

15+
int __vdso_clock_gettime64(clockid_t clock,
16+
struct __kernel_timespec *ts);
1217
int __vdso_clock_gettime64(clockid_t clock,
1318
struct __kernel_timespec *ts)
1419
{
1520
return __cvdso_clock_gettime(clock, ts);
1621
}
1722

23+
extern
24+
int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
25+
struct timezone *tz);
1826
int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
1927
struct timezone *tz)
2028
{
2129
return __cvdso_gettimeofday(tv, tz);
2230
}
2331

32+
extern
33+
int __vdso_clock_getres(clockid_t clock_id,
34+
struct old_timespec32 *res);
2435
int __vdso_clock_getres(clockid_t clock_id,
2536
struct old_timespec32 *res)
2637
{

0 commit comments

Comments
 (0)