Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kprobes: Use IS_ENABLED() instead of kprobes_built_in()

Use IS_ENABLED(CONFIG_KPROBES) instead of kprobes_built_in().
This inline function is introduced only for avoiding #ifdef.
But since now we have IS_ENABLED(), it is no longer needed.

Link: https://lkml.kernel.org/r/163163038581.489837.2805250706507372658.stgit@devnote2

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Masami Hiramatsu and committed by
Steven Rostedt (VMware)
dfc05b55 223a76b2

+1 -13
+1 -13
include/linux/kprobes.h
··· 180 180 DECLARE_PER_CPU(struct kprobe *, current_kprobe); 181 181 DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); 182 182 183 - /* 184 - * For #ifdef avoidance: 185 - */ 186 - static inline int kprobes_built_in(void) 187 - { 188 - return 1; 189 - } 190 - 191 183 extern void kprobe_busy_begin(void); 192 184 extern void kprobe_busy_end(void); 193 185 ··· 409 417 char *type, char *sym); 410 418 #else /* !CONFIG_KPROBES: */ 411 419 412 - static inline int kprobes_built_in(void) 413 - { 414 - return 0; 415 - } 416 420 static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) 417 421 { 418 422 return 0; ··· 502 514 static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, 503 515 unsigned int trap) 504 516 { 505 - if (!kprobes_built_in()) 517 + if (!IS_ENABLED(CONFIG_KPROBES)) 506 518 return false; 507 519 if (user_mode(regs)) 508 520 return false;