xtensa: ptrace: add prototypes to <asm/ptrace.h>
authorRandy Dunlap <rdunlap@infradead.org>
Wed, 20 Sep 2023 05:21:27 +0000 (22:21 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 20 Sep 2023 12:03:19 +0000 (05:03 -0700)
Add prototype for do_syscall_trace_enter() to asm/ptrace.h.
Move prototype for do_syscall_trace_leave() there to be consistent.

Fixes a build warning:

arch/xtensa/kernel/ptrace.c:545:5: warning: no previous prototype for 'do_syscall_trace_enter' [-Wmissing-prototypes]
  545 | int do_syscall_trace_enter(struct pt_regs *regs)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20230920052139.10570-5-rdunlap@infradead.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/ptrace.h
arch/xtensa/kernel/ptrace.c

index 308f209a4740790762dd6b2cbd9973bdf9259496..a270467556dc84df2c6ceb0786acee3669a059f8 100644 (file)
@@ -106,6 +106,9 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
        return regs->areg[2];
 }
 
+int do_syscall_trace_enter(struct pt_regs *regs);
+void do_syscall_trace_leave(struct pt_regs *regs);
+
 #else  /* __ASSEMBLY__ */
 
 # include <asm/asm-offsets.h>
index f29477162edefdff2bee2eeb3017f1b8e5947f55..9056cd1a8302cdcd8ca5b4ac3d4a8a3ac7ffdaef 100644 (file)
@@ -541,7 +541,6 @@ long arch_ptrace(struct task_struct *child, long request,
        return ret;
 }
 
-void do_syscall_trace_leave(struct pt_regs *regs);
 int do_syscall_trace_enter(struct pt_regs *regs)
 {
        if (regs->syscall == NO_SYSCALL)