Re: [Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-08-13 Thread Wei Yang
On Mon, Aug 12, 2019 at 06:18:43PM +0200, Paolo Bonzini wrote: >On 18/07/19 03:04, Wei Yang wrote: >> The value left in nr is the number of bits for the last word, which >> could be calculate the last word mask directly. >> >> Remove the unnecessary size. > >Hi, > >the value left in nr is _not_ th

Re: [Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-08-12 Thread Paolo Bonzini
On 18/07/19 03:04, Wei Yang wrote: > The value left in nr is the number of bits for the last word, which > could be calculate the last word mask directly. > > Remove the unnecessary size. Hi, the value left in nr is _not_ the number of bits for the last word if the start and the end are in the s

Re: [Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-07-21 Thread Wei Yang
On Sun, Jul 21, 2019 at 07:27:14PM +0200, Paolo Bonzini wrote: >On 21/07/19 02:33, Wei Yang wrote: >> On Thu, Jul 18, 2019 at 09:04:55AM +0800, Wei Yang wrote: >>> The value left in nr is the number of bits for the last word, which >>> could be calculate the last word mask directly. >>> >>> Remove

Re: [Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-07-21 Thread Paolo Bonzini
On 21/07/19 02:33, Wei Yang wrote: > On Thu, Jul 18, 2019 at 09:04:55AM +0800, Wei Yang wrote: >> The value left in nr is the number of bits for the last word, which >> could be calculate the last word mask directly. >> >> Remove the unnecessary size. >> > > May I ask why Patch 2 is picked up, but

Re: [Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-07-20 Thread Wei Yang
On Thu, Jul 18, 2019 at 09:04:55AM +0800, Wei Yang wrote: >The value left in nr is the number of bits for the last word, which >could be calculate the last word mask directly. > >Remove the unnecessary size. > May I ask why Patch 2 is picked up, but this one is not? >Signed-off-by: Wei Yang > >-

[Qemu-devel] [PATCH v3 1/2] bitmap: get last word mask from nr directly

2019-07-17 Thread Wei Yang
The value left in nr is the number of bits for the last word, which could be calculate the last word mask directly. Remove the unnecessary size. Signed-off-by: Wei Yang --- v2: refine bitmap_set_atomic too, suggested from Peter --- util/bitmap.c | 9 +++-- 1 file changed, 3 insertions(+),