lkml.org 
[lkml]   [2016]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/bitops.h: use IS_IMMEDIATE instead of dirrect call of __builtin_constant_p
Date
The arch/x86/include/asm/bitops.h provides IS_IMMEDIATE macro which expands to
the call of the __builtin_constant_p(). Let's use this macro in the test_bit()
to be more clear.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
arch/x86/include/asm/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index cfe3b95..8cfbd2b 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -333,7 +333,7 @@ static int test_bit(int nr, const volatile unsigned long *addr);
#endif

#define test_bit(nr, addr) \
- (__builtin_constant_p((nr)) \
+ (IS_IMMEDIATE((nr)) \
? constant_test_bit((nr), (addr)) \
: variable_test_bit((nr), (addr)))

--
2.7.2.335.g3476f70
\
 
 \ /
  Last update: 2016-02-26 14:41    [W:0.360 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site