[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] bitmap_*() should cope with zero size bitmaps



At 16:53 +0100 on 03 Jun (1370278413), Jan Beulich wrote:
> >>> On 03.06.13 at 17:40, Tim Deegan <tim@xxxxxxx> wrote:
> > At 14:33 +0100 on 03 Jun (1370270004), Jan Beulich wrote:
> >> +#define find_next_bit(addr, size, off) ({ \
> >> +    unsigned int r__ = (size); \
> >> +    unsigned int o__ = (off); \
> >> +    switch ( -!__builtin_constant_p(size) | r__ ) \
> > 
> > Mmmm, binary trickery. :)  But doesn't leave us with the old behaviour
> > in cases where 'size' is a non-compile-time-constant zero?
> 
> Intentionally (and not just for zero - the compile time constant zero
> case was what was broken after all)

Ah, I see -- the non-constant case was already OK.  Sorry for the noise.

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.