Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-08 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > On 08/07/2018 05:53 PM, Dr. David Alan Gilbert wrote: > > * Wei Wang (wei.w.w...@intel.com) wrote: > > > On 08/07/2018 03:39 PM, Peter Xu wrote: > > > > On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: > > > > > When "nbits = 0", which means no bi

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Wei Wang
On 08/07/2018 05:53 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: On 08/07/2018 03:39 PM, Peter Xu wrote: On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0xf

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Wei Wang
On 08/07/2018 08:17 PM, Peter Xu wrote: On Tue, Aug 07, 2018 at 04:21:15PM +0800, Wei Wang wrote: On 08/07/2018 03:39 PM, Peter Xu wrote: On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0xff

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Peter Xu
On Tue, Aug 07, 2018 at 04:21:15PM +0800, Wei Wang wrote: > On 08/07/2018 03:39 PM, Peter Xu wrote: > > On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: > > > When "nbits = 0", which means no bits to mask, this macro is expected to > > > return 0, instead of 0x. This patch changes

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > On 08/07/2018 03:39 PM, Peter Xu wrote: > > On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: > > > When "nbits = 0", which means no bits to mask, this macro is expected to > > > return 0, instead of 0x. This patch changes the macro to retu

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Wei Wang
On 08/07/2018 03:39 PM, Peter Xu wrote: On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0x. This patch changes the macro to return 0 when there is no bit needs to be masked. Signed-of

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-08-07 Thread Peter Xu
On Tue, Jul 31, 2018 at 06:01:18PM +0800, Wei Wang wrote: > When "nbits = 0", which means no bits to mask, this macro is expected to > return 0, instead of 0x. This patch changes the macro to return > 0 when there is no bit needs to be masked. > > Signed-off-by: Wei Wang > CC: Juan Quinte

Re: [Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-07-31 Thread Juan Quintela
Wei Wang wrote: > When "nbits = 0", which means no bits to mask, this macro is expected to > return 0, instead of 0x. This patch changes the macro to return > 0 when there is no bit needs to be masked. > > Signed-off-by: Wei Wang > CC: Juan Quintela > CC: Dr. David Alan Gilbert > CC: Pe

[Qemu-devel] [PATCH v2] bitmap: fix BITMAP_LAST_WORD_MASK

2018-07-31 Thread Wei Wang
When "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0x. This patch changes the macro to return 0 when there is no bit needs to be masked. Signed-off-by: Wei Wang CC: Juan Quintela CC: Dr. David Alan Gilbert CC: Peter Xu --- include/qemu/bitmap