From 5fff726dfa36d6bd3d858495a751fd2254c2d28d Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 5 Nov 2013 16:56:08 +1100 Subject: [PATCH] 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 --- include/linux/jump_label.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5