]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
string: introduce memweight()
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 21 Jul 2012 00:54:50 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 25 Jul 2012 03:53:17 +0000 (13:53 +1000)
commit39366e86150f4cca364e9d5d988cce85dd52f113
tree7c08c7dff8e6bd5e1517ded0241539a70c365901
parent6cdd7fa40affff6afdda25ccad6bf1a540d32684
string: introduce memweight()

memweight() is the function that counts the total number of bits set in
memory area.  Unlike bitmap_weight(), memweight() takes pointer and size
in bytes to specify a memory area which does not need to be aligned to
long-word boundary.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Anders Larsen <al@alarsen.net>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/string.h
lib/string.c