diff --git a/arch/riscv/kernel/probes/decode-insn.c b/arch/riscv/kernel/probes/decode-insn.c index 0876c304ca77..0ed043acc882 100644 --- a/arch/riscv/kernel/probes/decode-insn.c +++ b/arch/riscv/kernel/probes/decode-insn.c @@ -16,7 +16,7 @@ enum probe_insn __kprobes riscv_probe_decode_insn(probe_opcode_t *addr, struct arch_probe_insn *api) { - probe_opcode_t insn = le32_to_cpu(*addr); + probe_opcode_t insn = *addr; /* * Reject instructions list: diff --git a/arch/riscv/kernel/probes/kprobes.c b/arch/riscv/kernel/probes/kprobes.c index e60893bd87db..a2ec18662fee 100644 --- a/arch/riscv/kernel/probes/kprobes.c +++ b/arch/riscv/kernel/probes/kprobes.c @@ -57,7 +57,7 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) } /* copy instruction */ - p->opcode = le32_to_cpu(*p->addr); + p->opcode = *p->addr; /* decode instruction */ switch (riscv_probe_decode_insn(p->addr, &p->ainsn.api)) {