diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2013-11-12 15:08:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 12:09:13 +0900 |
commit | 261adc9a609dbfde815337889b9e2c8728959ab8 (patch) | |
tree | 2286fd76839d591085b8770bba99e2fa5ec77d1d /include/linux | |
parent | 81e41ea25b52ca8175ceb209438f14182a600d6d (diff) |
jump_label: unlikely(x) > 0
if (unlikely(x) > 0) doesn't seem to help branch prediction
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/jump_label.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index a5079072da6..cf08540d620 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; } |