arm64: fix error: conflicting types for 'kprobe_fault_handler' 49/149949/1
authorPratyush Anand <panand@redhat.com>
Mon, 7 Nov 2016 17:37:22 +0000 (23:07 +0530)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Wed, 13 Sep 2017 16:01:00 +0000 (18:01 +0200)
commit6a8a28206daa56e02f05bae2845e86d23ec83095
treec219d3ef4f27638979a6c1c71d3978f57e09416e
parent062069c0f8eee23ec16b2a4c803e63daea206575
arm64: fix error: conflicting types for 'kprobe_fault_handler'

When CONFIG_KPROBE is disabled but CONFIG_UPROBE_EVENT is enabled, we get
following compilation error:

In file included from
.../arch/arm64/kernel/probes/decode-insn.c:20:0:
.../arch/arm64/include/asm/kprobes.h:52:5: error:
conflicting types for 'kprobe_fault_handler'
 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
     ^~~~~~~~~~~~~~~~~~~~
In file included from
.../arch/arm64/kernel/probes/decode-insn.c:17:0:
.../include/linux/kprobes.h:398:90: note:
previous definition of 'kprobe_fault_handler' was here
 static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
                                                                                          ^
.../scripts/Makefile.build:290: recipe for target
'arch/arm64/kernel/probes/decode-insn.o' failed

<asm/kprobes.h> is already included from <linux/kprobes.h> under #ifdef
CONFIG_KPROBE. So, this patch fixes the error by removing it from
decode-insn.c.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
[ Mainline commit 7b03b62 ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: Icd734933745ba4a19847aab800281e10085ad03b
arch/arm64/kernel/probes/decode-insn.c