Skip to content

Commit ce7f27d

Browse files
ruanjinjie-engmhiramat
authored andcommitted
kprobes: Cleanup the config comment
The CONFIG_KPROBES_ON_FTRACE #if/#else/#endif section is small and doesn't nest additional #ifdefs so the comment is useless and should be removed, but the __ARCH_WANT_KPROBES_INSN_SLOT and CONFIG_OPTPROBES() nest is long, it is better to add comment for reading. Link: https://lore.kernel.org/all/20240813115334.3922580-3-ruanjinjie@huawei.com/ Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
1 parent 42f7652 commit ce7f27d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

kernel/kprobes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ struct kprobe_insn_cache kprobe_optinsn_slots = {
353353
/* .insn_size is initialized later */
354354
.nr_garbage = 0,
355355
};
356-
#endif
357-
#endif
356+
#endif /* CONFIG_OPTPROBES */
357+
#endif /* __ARCH_WANT_KPROBES_INSN_SLOT */
358358

359359
/* We have preemption disabled.. so it is safe to use __ versions */
360360
static inline void set_kprobe_instance(struct kprobe *kp)
@@ -1543,7 +1543,7 @@ static int check_ftrace_location(struct kprobe *p)
15431543
if (ftrace_location(addr) == addr) {
15441544
#ifdef CONFIG_KPROBES_ON_FTRACE
15451545
p->flags |= KPROBE_FLAG_FTRACE;
1546-
#else /* !CONFIG_KPROBES_ON_FTRACE */
1546+
#else
15471547
return -EINVAL;
15481548
#endif
15491549
}

0 commit comments

Comments
 (0)