summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-02-02 21:36:07 +0100
committerHeiko Carstens <hca@linux.ibm.com>2023-02-06 11:13:53 +0100
commit1e2eb49bb14760cc7ec0c301c705410628bee8e9 (patch)
tree1b1a0d6a2dcf777e597eb8f9db3ddac3ec29059b /arch/s390/kernel
parentfb9293b9f32d01ee491606a3655054d539b89f66 (diff)
downloadlinux-stable-1e2eb49bb14760cc7ec0c301c705410628bee8e9.tar.gz
linux-stable-1e2eb49bb14760cc7ec0c301c705410628bee8e9.tar.bz2
linux-stable-1e2eb49bb14760cc7ec0c301c705410628bee8e9.zip
s390/rethook: add local rethook header file
Compiling the kernel with CONFIG_KPROBES disabled, but CONFIG_RETHOOK enabled, results in this sparse warning: arch/s390/kernel/rethook.c:26:15: warning: no previous prototype for 'arch_rethook_trampoline_callback' [-Wmissing-prototypes] 26 | unsigned long arch_rethook_trampoline_callback(struct pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a local rethook header file similar to riscv to address this. Reported-by: kernel test robot <lkp@intel.com> Fixes: 1a280f48c0e4 ("s390/kprobes: replace kretprobe with rethook") Link: https://lore.kernel.org/all/202302030102.69dZIuJk-lkp@intel.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/rethook.c1
-rw-r--r--arch/s390/kernel/rethook.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/s390/kernel/rethook.c b/arch/s390/kernel/rethook.c
index f2b6237bc35d..af10e6bdd34e 100644
--- a/arch/s390/kernel/rethook.c
+++ b/arch/s390/kernel/rethook.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/rethook.h>
#include <linux/kprobes.h>
+#include "rethook.h"
void arch_rethook_prepare(struct rethook_node *rh, struct pt_regs *regs, bool mcount)
{
diff --git a/arch/s390/kernel/rethook.h b/arch/s390/kernel/rethook.h
new file mode 100644
index 000000000000..32f069eed3f3
--- /dev/null
+++ b/arch/s390/kernel/rethook.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __S390_RETHOOK_H
+#define __S390_RETHOOK_H
+
+unsigned long arch_rethook_trampoline_callback(struct pt_regs *regs);
+
+#endif