linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/mbcache.c: replacing __builtin_log2() with ilog2()
@ 2014-05-30 17:35 T Makphaibulchoke
  2014-06-24 23:24 ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: T Makphaibulchoke @ 2014-05-30 17:35 UTC (permalink / raw)
  To: viro, linux-fsdevel, linux-kernel, tytso; +Cc: T Makphaibulchoke

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@hp.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/mbcache.c: replacing __builtin_log2() with ilog2()
  2014-05-30 17:35 [PATCH] fs/mbcache.c: replacing __builtin_log2() with ilog2() T Makphaibulchoke
@ 2014-06-24 23:24 ` Maciej W. Rozycki
  2014-06-26  2:13   ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2014-06-24 23:24 UTC (permalink / raw)
  To: T Makphaibulchoke; +Cc: viro, linux-fsdevel, linux-kernel, tytso

On Fri, 30 May 2014, T Makphaibulchoke wrote:

> 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@hp.com>

Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/mbcache.c: replacing __builtin_log2() with ilog2()
  2014-06-24 23:24 ` Maciej W. Rozycki
@ 2014-06-26  2:13   ` Theodore Ts'o
  0 siblings, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2014-06-26  2:13 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: T Makphaibulchoke, viro, linux-fsdevel, linux-kernel

On Wed, Jun 25, 2014 at 12:24:49AM +0100, Maciej W. Rozycki wrote:
> On Fri, 30 May 2014, T Makphaibulchoke wrote:
> 
> > 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@hp.com>
> 
> Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>

Thanks, applied.

					- Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-26  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30 17:35 [PATCH] fs/mbcache.c: replacing __builtin_log2() with ilog2() T Makphaibulchoke
2014-06-24 23:24 ` Maciej W. Rozycki
2014-06-26  2:13   ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).