lkml.org 
[lkml]   [2007]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix get_order()


On Tue, 6 Mar 2007, David Howells wrote:
> @@ -159,8 +175,8 @@ unsigned long __roundup_pow_of_two(unsigned long n)
> #define roundup_pow_of_two(n) \
> ( \
> __builtin_constant_p(n) ? ( \
> - (n == 1) ? 0 : \
> - (1UL << (ilog2((n) - 1) + 1)) \
> + (n == 1) ? 1 : \
> + (1UL << ilog2_up(n)) \
> ) : \
> __roundup_pow_of_two(n) \

That seems bogus. "n == 1" should give "0", no?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-06 19:49    [W:0.081 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site