]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: simplify arch_uprobe_xol_was_trapped return
authorOsama Abdelkader <osama.abdelkader@gmail.com>
Wed, 26 Nov 2025 22:31:30 +0000 (00:31 +0200)
committerWill Deacon <will@kernel.org>
Mon, 5 Jan 2026 16:42:59 +0000 (16:42 +0000)
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>
arch/arm64/kernel/probes/uprobes.c

index 941668800aeae4e2fce90d93ea2f42815bc0fc7a..c451ca17a656e77e6ea66f366eeecdd6929428a1 100644 (file)
@@ -103,10 +103,7 @@ bool arch_uprobe_xol_was_trapped(struct task_struct *t)
         * insn itself is trapped, then detect the case with the help of
         * invalid fault code which is being set in arch_uprobe_pre_xol
         */
-       if (t->thread.fault_code != UPROBE_INV_FAULT_CODE)
-               return true;
-
-       return false;
+       return t->thread.fault_code != UPROBE_INV_FAULT_CODE;
 }
 
 bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)