Re: [PATCH] Add a rounddown_pow_of_two() macro to log2.h.

2007-01-26 Thread Kyle Moffett
On Jan 26, 2007, at 02:24:35, Robert P. J. Day wrote: On Thu, 25 Jan 2007, Andrew Morton wrote: On Thu, 25 Jan 2007 04:32:12 -0500 (EST) "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: +/* + * round down to nearest power of two + */ +static inline __attribute__((const)) +unsigned long __rounddown

Re: [PATCH] Add a rounddown_pow_of_two() macro to log2.h.

2007-01-25 Thread Robert P. J. Day
On Thu, 25 Jan 2007, Andrew Morton wrote: > On Thu, 25 Jan 2007 04:32:12 -0500 (EST) > "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > > +/* > > + * round down to nearest power of two > > + */ > > +static inline __attribute__((const)) > > +unsigned long __rounddown_pow_of_two(unsigned long n) > >

Re: [PATCH] Add a rounddown_pow_of_two() macro to log2.h.

2007-01-25 Thread Andrew Morton
On Thu, 25 Jan 2007 04:32:12 -0500 (EST) "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > > In the same way that include/linux/log2.h defines the > roundup_pow_of_two() macro, define the rounddown_pow_of_two() macro so > peopls can stop re-implementing this operation using a loop. > > Signed-of

[PATCH] Add a rounddown_pow_of_two() macro to log2.h.

2007-01-25 Thread Robert P. J. Day
In the same way that include/linux/log2.h defines the roundup_pow_of_two() macro, define the rounddown_pow_of_two() macro so peopls can stop re-implementing this operation using a loop. Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> --- compile tested on x86 using "make allyesconfig",