[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401471304-37479-1-git-send-email-tmac@hp.com>
Date: Fri, 30 May 2014 11:35:04 -0600
From: T Makphaibulchoke <tmac@...com>
To: viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, tytso@....edu
Cc: T Makphaibulchoke <tmac@...com>
Subject: [PATCH] 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 <tmac@...com>
---
fs/mbcache.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/mbcache.c b/fs/mbcache.c
index bf166e3..187477d 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -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))
--
1.7.11.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists