On Tue, Aug 01, 2017 at 09:40:09AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Mon, Jul 31, 2017 at 06:11:56PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > It is used to invert the whole bitmap. > > > > > > Would it be easier to change bitmap_complement to use ^ > > > in it's macro and slow_bitmap_complement, and then you could call it > > > with src==dst to do the same thing with just that small change? > > > > Or, I can directly use that and drop this patch. :-) > > Yes, that's fine - note the only difference I see is what happens to the > bits in the last word after the end of the count; your code leaves them > as is, the complement code will zero them on the destination I think.
I see. I believe both should work since bitmap users should not use those bits after all (considering those bits are outside range of valid bits when declaring the bitmap). Thanks, -- Peter Xu