mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
kprobes: Use bool type for functions which returns boolean value
Use the 'bool' type instead of 'int' for the functions which returns a boolean value, because this makes clear that those functions don't return any error code. Link: https://lkml.kernel.org/r/163163041649.489837.17311187321419747536.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (VMware)
parent
c42421e205
commit
29e8077ae2
@@ -104,25 +104,25 @@ struct kprobe {
|
||||
#define KPROBE_FLAG_FTRACE 8 /* probe is using ftrace */
|
||||
|
||||
/* Has this kprobe gone ? */
|
||||
static inline int kprobe_gone(struct kprobe *p)
|
||||
static inline bool kprobe_gone(struct kprobe *p)
|
||||
{
|
||||
return p->flags & KPROBE_FLAG_GONE;
|
||||
}
|
||||
|
||||
/* Is this kprobe disabled ? */
|
||||
static inline int kprobe_disabled(struct kprobe *p)
|
||||
static inline bool kprobe_disabled(struct kprobe *p)
|
||||
{
|
||||
return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE);
|
||||
}
|
||||
|
||||
/* Is this kprobe really running optimized path ? */
|
||||
static inline int kprobe_optimized(struct kprobe *p)
|
||||
static inline bool kprobe_optimized(struct kprobe *p)
|
||||
{
|
||||
return p->flags & KPROBE_FLAG_OPTIMIZED;
|
||||
}
|
||||
|
||||
/* Is this kprobe uses ftrace ? */
|
||||
static inline int kprobe_ftrace(struct kprobe *p)
|
||||
static inline bool kprobe_ftrace(struct kprobe *p)
|
||||
{
|
||||
return p->flags & KPROBE_FLAG_FTRACE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user