arm64: simplify arch_uprobe_xol_was_trapped return
PATCH 1/1 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
--- arch/arm64/kernel/probes/uprobes.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
arch/arm64/kernel/probes/uprobes.c +1 -4
@@ -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)
Signature · 1 line
2.43.0
Quoted 5 lines · On Thu, 27 Nov 2025 00:31:30 +0200 Osama Abdelkader…
convert
arch_uprobe_xol_was_trapped()from explicit if/return true return false pattern to direct boolean expression return inarch/arm64/kernel/probes/uprobes.cSigned-off-by Osama Abdelkader <[email protected]>
Looks good to me.
Thanks!
Quoted 23 lines
--- arch/arm64/kernel/probes/uprobes.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)arch/arm64/kernel/probes/uprobes.c +1
-4@@ -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)Signature · 1 line
2.43.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Quoted 5 lines · Osama Abdelkader
convert
arch_uprobe_xol_was_trapped()from explicit if/return true return false pattern to direct boolean expression return inarch/arm64/kernel/probes/uprobes.cSigned-off-by Osama Abdelkader <[email protected]>
Quoted 20 lines
--- arch/arm64/kernel/probes/uprobes.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)arch/arm64/kernel/probes/uprobes.c +1
-4@@ -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)
Quoted 5 lines · Osama Abdelkader
convert
arch_uprobe_xol_was_trapped()from explicit if/return true return false pattern to direct boolean expression return inarch/arm64/kernel/probes/uprobes.c
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64: simplify arch_uprobe_xol_was_trapped return
https://git.kernel.org/arm64/c/484626209600
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev