diff options
| author | Osama Abdelkader <osama.abdelkader@gmail.com> | 2025-11-27 01:31:30 +0300 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-01-05 19:42:59 +0300 |
| commit | 48462620960069b043cbbf809c48a2bfcffd9368 (patch) | |
| tree | 530e9223aeb01f133cb251af28927674e891d3cd | |
| parent | 8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff) | |
| download | linux-48462620960069b043cbbf809c48a2bfcffd9368.tar.xz | |
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>
| -rw-r--r-- | arch/arm64/kernel/probes/uprobes.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm64/kernel/probes/uprobes.c b/arch/arm64/kernel/probes/uprobes.c index 941668800aea..c451ca17a656 100644 --- a/arch/arm64/kernel/probes/uprobes.c +++ b/arch/arm64/kernel/probes/uprobes.c @@ -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) |
