[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [PATCH] IPoIB queue size tune patch
From:       Roland Dreier <rdreier () cisco ! com>
Date:       2006-03-31 20:44:49
Message-ID: adaacb6z6m6.fsf () cisco ! com
[Download RAW message or body]

 > +static int expsize(int size)
 > +{ 
 > +       int expsize_t = 1;
 > +       int j = 1;
 > +       while (size / 2 >= expsize_t) {
 > +               expsize_t = 1 << ++j;
 > +       }
 > +       return expsize_t;
 > +}

Yikes... is this just a very hard-to-understand version of roundup_pow_of_two()?

Hmm, no, it's rounding down I guess.  But is there any reason not to
use roundup_pow_of_two() instead?

 - R.
-
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/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic