On Friday 17 September 2004 15:35, Andrew Morton wrote: > Ryan Cumming wrote: > > How does this look? > > > > ... > > +static inline unsigned long __attribute_pure__ roundup_pow_of_two(int x) > > +{ > > + return (1UL << fls(x)); > > +} > > Any reason for making the argument an integer, rather than unsigned long? I originally had it as unsigned long, but I changed it to match what fls() takes. Would it be better as an unsigned long despite that? -Ryan