From: Andrew Morton Use bool like a bool! Cc: Ananth N Mavinakayanahalli Cc: Srinivasa DS Signed-off-by: Andrew Morton --- kernel/kprobes.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff -puN kernel/kprobes.c~kprobes-the-on-off-knob-thru-debugfs-updated-fix kernel/kprobes.c --- a/kernel/kprobes.c~kprobes-the-on-off-knob-thru-debugfs-updated-fix +++ a/kernel/kprobes.c @@ -569,7 +569,7 @@ static int __kprobes __register_kprobe(s hlist_add_head_rcu(&p->hlist, &kprobe_table[hash_ptr(p->addr, KPROBE_HASH_BITS)]); - if (kprobe_enabled == 1) { + if (kprobe_enabled) { if (atomic_add_return(1, &kprobe_count) == \ (ARCH_INACTIVE_KPROBE_COUNT + 1)) register_page_fault_notifier(&kprobe_page_fault_nb); @@ -621,7 +621,7 @@ valid_p: * enabled - otherwise, the breakpoint would already have * been removed. We save on flushing icache. */ - if (kprobe_enabled == 1) + if (kprobe_enabled) arch_disarm_kprobe(p); hlist_del_rcu(&old_p->hlist); cleanup_p = 1; @@ -812,7 +812,7 @@ static int __init init_kprobes(void) atomic_set(&kprobe_count, 0); /* By default, kprobes are enabled */ - kprobe_enabled = 1; + kprobe_enabled = true; err = arch_init_kprobes(); if (!err) @@ -912,7 +912,7 @@ static void __kprobes enable_all_kprobes mutex_lock(&kprobe_mutex); /* If kprobes are already enabled, just return */ - if (kprobe_enabled == 1) + if (kprobe_enabled) goto already_enabled; /* @@ -928,7 +928,7 @@ static void __kprobes enable_all_kprobes arch_arm_kprobe(p); } - kprobe_enabled = 1; + kprobe_enabled = true; already_enabled: mutex_unlock(&kprobe_mutex); @@ -945,10 +945,10 @@ static void __kprobes disable_all_kprobe mutex_lock(&kprobe_mutex); /* If kprobes are already disabled, just return */ - if (kprobe_enabled == 0) + if (!kprobe_enabled) goto already_disabled; - kprobe_enabled = 0; + kprobe_enabled = false; for (i = 0; i < KPROBE_TABLE_SIZE; i++) { head = &kprobe_table[i]; hlist_for_each_entry_rcu(p, node, head, hlist) { _