mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel/kprobes: kprobes_built_in can be boolean
@ 2017-12-15  6:41 guzhifeng
  2017-12-16 14:50 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: guzhifeng @ 2017-12-15  6:41 UTC (permalink / raw)
  To: ananth, anil.s.keshavamurthy, davem, mhiramat; +Cc: linux-kernel, guzhifeng

This patch makes kprobes_built_in return bool due to this
particular function only using either one or zero as its return
value.

No functional change.

Signed-off-by: guzhifeng <guzhifeng@cmss.chinamobile.com>
---
 include/linux/kprobes.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 9440a2f..8d0d910 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -219,9 +219,9 @@ struct kprobe_blacklist_entry {
 /*
  * For #ifdef avoidance:
  */
-static inline int kprobes_built_in(void)
+static inline bool kprobes_built_in(void)
 {
-	return 1;
+	return true;
 }
 
 #ifdef CONFIG_KRETPROBES
@@ -409,9 +409,9 @@ static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
 
 #else /* !CONFIG_KPROBES: */
 
-static inline int kprobes_built_in(void)
+static inline bool kprobes_built_in(void)
 {
-	return 0;
+	return false;
 }
 static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
 {
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-16 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-15  6:41 [PATCH] kernel/kprobes: kprobes_built_in can be boolean guzhifeng
2017-12-16 14:50 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome