Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Wei Yang
On Wed, Jul 17, 2019 at 11:11:55AM +0800, Peter Xu wrote: >On Wed, Jul 17, 2019 at 10:46:37AM +0800, Wei Yang wrote: >> On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: >> >On Wed, Jul 17, 2019 at 09:29:02AM +0800, Wei Yang wrote: >> >> The value left in nr is the number of bits for the la

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Peter Xu
On Wed, Jul 17, 2019 at 10:46:37AM +0800, Wei Yang wrote: > On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: > >On Wed, Jul 17, 2019 at 09:29:02AM +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 dire

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Wei Yang
On Wed, Jul 17, 2019 at 09:59:10AM +0800, Peter Xu wrote: >On Wed, Jul 17, 2019 at 09:29:02AM +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. > >Is it true even if start does not align to BITS_PER_LONG?

Re: [Qemu-devel] [RESEND][PATCH] bitmap: get last word mask from nr directly

2019-07-16 Thread Peter Xu
On Wed, Jul 17, 2019 at 09:29:02AM +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. Is it true even if start does not align to BITS_PER_LONG? > > Remove the unnecessary size. > > Signed-off-by: Wei Yan