fs/mbcache.c: replacing __builtin_log2() with ilog2()
PATCH 1/1 fs/mbcache.c: replacing __builtin_log2() with ilog2()
Fixing compiler error with some gcc version(s) that do not support __builtin_log2(). Replacing __builtin_log2() with ilog2().
Signed-off-by T. Makphaibulchoke <[email protected]>
--- fs/mbcache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/mbcache.c +2 -1
@@ -73,6 +73,7 @@#include <linux/mbcache.h> #include <linux/init.h> #include <linux/blockgroup_lock.h> +#include <linux/log2.h> #ifdef MB_CACHE_DEBUG # define mb_debug(f...) do { \
@@ -93,7 +94,7 @@#define MB_CACHE_WRITER ((unsigned short)~0U >> 1) -#define MB_CACHE_ENTRY_LOCK_BITS __builtin_log2(NR_BG_LOCKS) +#define MB_CACHE_ENTRY_LOCK_BITS ilog2(NR_BG_LOCKS)#define MB_CACHE_ENTRY_LOCK_INDEX (ce) \ (hash_long((unsigned long)ce, MB_CACHE_ENTRY_LOCK_BITS))
Signature · 1 line
1.7.11.3
Quoted 5 lines · T Makphaibulchoke
Fixing compiler error with some gcc version(s) that do not support
__builtin_log2(). Replacing__builtin_log2()withilog2().Signed-off-by T. Makphaibulchoke <[email protected]>
Reviewed-by Maciej W. Rozycki <[email protected]>
Maciej
Theodore Ts'o
AppliedQuoted 9 lines · Maciej W. Rozycki
Quoted 5 lines · T Makphaibulchoke
Fixing compiler error with some gcc version(s) that do not support
__builtin_log2(). Replacing__builtin_log2()withilog2().Signed-off-by T. Makphaibulchoke <[email protected]>Reviewed-by Maciej W. Rozycki <[email protected]>
Thanks, applied.
- Ted