Skip to content

Commit 4846262

Browse files
osamakaderwilldeacon
authored andcommitted
arm64: simplify arch_uprobe_xol_was_trapped return
convert arch_uprobe_xol_was_trapped() from explicit if/return true return false pattern to direct boolean expression return in arch/arm64/kernel/probes/uprobes.c Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 8f0b4cc commit 4846262

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

arch/arm64/kernel/probes/uprobes.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ bool arch_uprobe_xol_was_trapped(struct task_struct *t)
103103
* insn itself is trapped, then detect the case with the help of
104104
* invalid fault code which is being set in arch_uprobe_pre_xol
105105
*/
106-
if (t->thread.fault_code != UPROBE_INV_FAULT_CODE)
107-
return true;
108-
109-
return false;
106+
return t->thread.fault_code != UPROBE_INV_FAULT_CODE;
110107
}
111108

112109
bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)

0 commit comments

Comments
 (0)