From 261adc9a609dbfde815337889b9e2c8728959ab8 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 12 Nov 2013 15:08:44 -0800 Subject: jump_label: unlikely(x) > 0 if (unlikely(x) > 0) doesn't seem to help branch prediction Signed-off-by: Roel Kluin Cc: Raghavendra K T Cc: Konrad Rzeszutek Wilk Cc: "H. Peter Anvin" Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/linux/jump_label.h') diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index a5079072da66..cf08540d6204 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -132,14 +132,14 @@ static __always_inline void jump_label_init(void) static __always_inline bool static_key_false(struct static_key *key) { - if (unlikely(atomic_read(&key->enabled)) > 0) + if (unlikely(atomic_read(&key->enabled) > 0)) return true; return false; } static __always_inline bool static_key_true(struct static_key *key) { - if (likely(atomic_read(&key->enabled)) > 0) + if (likely(atomic_read(&key->enabled) > 0)) return true; return false; } -- cgit