On Fri, May 22, 2015 at 09:43:20 -0700, Stephen Hemminger wrote: > On Fri, 22 May 2015 18:54:20 +0530 > Rahul Lakkireddy <rahul.lakkireddy at chelsio.com> wrote: > > > +/** > > + * fls - find last (most-significant) bit set > > + * @x: the word to search > > + * > > + * This is defined the same way as ffs. > > + * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. > > + */ > > +static inline int fls(int x) > > Isn't there a Gcc intrinsic already for this?
I guess you are referring to __builtin_clz ? I will do that change in v2. Thanks, Rahul.