Re: [RFC, 2.6] a simple FIFO implementation
From: Ryan Cumming
Date: Fri Sep 17 2004 - 19:10:40 EST
On Friday 17 September 2004 15:35, Andrew Morton wrote:
> Ryan Cumming <ryan@xxxxxxxxxxxxxxxxxxx> 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
Attachment:
pgp00000.pgp
Description: PGP signature