]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] bitops: generic hweight{64,32,16,8}()
authorAkinobu Mita <mita@miraclelinux.com>
Sun, 26 Mar 2006 09:39:13 +0000 (01:39 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 26 Mar 2006 16:57:11 +0000 (08:57 -0800)
commitb599454a0a6089456c16dcf2ac2a8905a2109ff4
treed8ea52d6b490c0e3b3851e1887c01700cc0115c6
parent97f406371c470dc47db26080cefb5b741e1e036d
[PATCH] bitops: generic hweight{64,32,16,8}()

This patch introduces the C-language equivalents of the functions below:

unsigned int hweight32(unsigned int w);
unsigned int hweight16(unsigned int w);
unsigned int hweight8(unsigned int w);
unsigned long hweight64(__u64 w);

In include/asm-generic/bitops/hweight.h

This code largely copied from: include/linux/bitops.h

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-generic/bitops/hweight.h [new file with mode: 0644]
lib/Makefile
lib/hweight.c [new file with mode: 0644]