Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a06a52ee1b0cdb65222474ba6186f3991df68b0
Commit:     1a06a52ee1b0cdb65222474ba6186f3991df68b0
Parent:     18963c01b8abf381f102752ce024c3582a716125
Author:     Rolf Eike Beer <[EMAIL PROTECTED]>
AuthorDate: Thu May 17 23:56:56 2007 +0200
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri May 18 20:46:30 2007 -0700

    Fix roundup_pow_of_two(1)
    
    1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It 
does
    in case the argument is a variable but in case it's a constant it behaves
    wrong and returns 0. Probably nobody ever did it so this was never noticed.
    
    Signed-off-by: Rolf Eike Beer <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/log2.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/log2.h b/include/linux/log2.h
index 57e641e..1b8a2c1 100644
--- a/include/linux/log2.h
+++ b/include/linux/log2.h
@@ -159,7 +159,7 @@ unsigned long __roundup_pow_of_two(unsigned long n)
 #define roundup_pow_of_two(n)                  \
 (                                              \
        __builtin_constant_p(n) ? (             \
-               (n == 1) ? 0 :                  \
+               (n == 1) ? 1 :                  \
                (1UL << (ilog2((n) - 1) + 1))   \
                                   ) :          \
        __roundup_pow_of_two(n)                 \
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to