[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH v3 02/18] xen: Add log2 functionality
>>> On 24.06.15 at 15:05, <vijay.kilari@xxxxxxxxx> wrote: > On Mon, Jun 22, 2015 at 6:47 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote: >>>>> On 22.06.15 at 14:01, <vijay.kilari@xxxxxxxxx> wrote: >>> --- a/xen/include/xen/bitops.h >>> +++ b/xen/include/xen/bitops.h >>> @@ -117,6 +117,14 @@ static inline int generic_fls64(__u64 x) >>> # endif >>> #endif >>> >>> +static inline unsigned fls_long(unsigned long l) >>> +{ >>> + if (sizeof(l) == 4) >>> + return fls(l); >>> + >>> + return fls64(l); >>> +} >> >> I'm not really opposed to this, but did you really verify that there's >> no suitable functionality in tree already (even if named differently)? >> I can't, e.g., see why flsl() wouldn't fit your needs. > > #define fls64 flsl > So flsl also should be fine No idea what you mean to say with the first of the two lines. >>> +/* >>> + * deal with unrepresentable constant logarithms >>> + */ >>> +extern __attribute__((const)) >>> +int ____ilog2_NaN(void); >> >> -ETOOMANYUNDERSCORES > > I have taken this from linux. I have not introduced it. > >> >>> +#if 1 >> >> ??? (at least one more below) >> >> Also, are you really needing all of what you add here? > > I have taken complete log2 file from linux. And how much of it do you really need? In any event I'd like to ask not to copy rubbish like this. Also, in the description you say "ported" while taking the complete file should be expressed differently imo (and should indicate the version it was taken from so that people wanting to update it later will know what to diff against). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |