Re: [PATCH 01/10] string: introduce memweight

2012-05-24 Thread Akinobu Mita
2012/5/23 Matthew Wilcox matt...@wil.cx: On Wed, May 23, 2012 at 09:12:18PM +0900, Akinobu Mita wrote: size_t memweight(const void *ptr, size_t bytes) Why should this return size_t instead of unsigned long? I just use the same type as the bytes argument without mature consideration. If

Re: [PATCH 01/10] string: introduce memweight

2012-05-23 Thread Akinobu Mita
2012/5/23 Jan Kara j...@suse.cz: On Sun 20-05-12 22:23:14, Akinobu Mita wrote: memweight() is the function that counts the total number of bits set in memory area.  The memory area doesn't need to be aligned to long-word boundary unlike bitmap_weight().  Thanks for the patch. I have some

Re: [PATCH 01/10] string: introduce memweight

2012-05-23 Thread Jan Kara
On Wed 23-05-12 21:12:18, Akinobu Mita wrote: 2012/5/23 Jan Kara j...@suse.cz: On Sun 20-05-12 22:23:14, Akinobu Mita wrote: memweight() is the function that counts the total number of bits set in memory area.  The memory area doesn't need to be aligned to long-word boundary unlike

[PATCH 01/10] string: introduce memweight

2012-05-20 Thread Akinobu Mita
memweight() is the function that counts the total number of bits set in memory area. The memory area doesn't need to be aligned to long-word boundary unlike bitmap_weight(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Anders Larsen a...@alarsen.net Cc: Alasdair Kergon a...@redhat.com