aboutsummaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorGravatar Geert Uytterhoeven <geert+renesas@glider.be> 2024-03-01 22:02:32 +0100
committerGravatar John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> 2024-05-02 12:01:25 +0200
commitcb1a55ec49200c7c2f6a4828558b74493d1b9a8f (patch)
treec7325c68033f2b36e656c75baa0605c5cd268566 /arch/sh
parentsh: kprobes: Make trampoline_probe_handler() static (diff)
downloadlinux-cb1a55ec49200c7c2f6a4828558b74493d1b9a8f.tar.gz
linux-cb1a55ec49200c7c2f6a4828558b74493d1b9a8f.tar.bz2
linux-cb1a55ec49200c7c2f6a4828558b74493d1b9a8f.zip
sh: kprobes: Remove unneeded kprobe_opcode_t casts
There is no need to cast a kprobe_opcode_t pointer to a kprobe_opcode_t pointer. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/fc22b990d869fc2005990159d8072ae2774b1396.1709326528.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/kprobes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index d8c2e399d6e5..49c4ffd782d6 100644
--- a/arch/sh/kernel/kprobes.c
+++ b/arch/sh/kernel/kprobes.c
@@ -39,7 +39,7 @@ static DEFINE_PER_CPU(struct kprobe, saved_next_opcode2);
int __kprobes arch_prepare_kprobe(struct kprobe *p)
{
- kprobe_opcode_t opcode = *(kprobe_opcode_t *) (p->addr);
+ kprobe_opcode_t opcode = *p->addr;
if (OPCODE_RTE(opcode))
return -EFAULT; /* Bad breakpoint */
@@ -248,7 +248,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
p = get_kprobe(addr);
if (!p) {
/* Not one of ours: let kernel handle it */
- if (*(kprobe_opcode_t *)addr != BREAKPOINT_INSTRUCTION) {
+ if (*addr != BREAKPOINT_INSTRUCTION) {
/*
* The breakpoint instruction was removed right
* after we hit it. Another cpu has removed