Re: [RFC, 2.6] a simple FIFO implementation

From: Andrew Morton
Date: Fri Sep 17 2004 - 17:39:03 EST


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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/