summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/highlevel.c
diff options
context:
space:
mode:
authorAkinobu Mita <mita@miraclelinux.com>2006-03-26 01:39:56 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:57:15 -0800
commit37d54111c133bea05fbae9dfe6d3d61a1b19c09b (patch)
tree780d15232a465815b96e2cd22c85b3e05f2b1238 /drivers/ieee1394/highlevel.c
parente9bebd6f3acee68fa07d44726895b40733cb1dc0 (diff)
downloadop-kernel-dev-37d54111c133bea05fbae9dfe6d3d61a1b19c09b.zip
op-kernel-dev-37d54111c133bea05fbae9dfe6d3d61a1b19c09b.tar.gz
[PATCH] bitops: hweight() related cleanup
By defining generic hweight*() routines - hweight64() will be defined on all architectures - hweight_long() will use architecture optimized hweight32() or hweight64() I found two possible cleanups by these reasons. Signed-off-by: Akinobu Mita <mita@miraclelinux.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ieee1394/highlevel.c')
-rw-r--r--drivers/ieee1394/highlevel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
index 734b121..491e603 100644
--- a/drivers/ieee1394/highlevel.c
+++ b/drivers/ieee1394/highlevel.c
@@ -306,8 +306,7 @@ u64 hpsb_allocate_and_register_addrspace(struct hpsb_highlevel *hl,
u64 align_mask = ~(alignment - 1);
if ((alignment & 3) || (alignment > 0x800000000000ULL) ||
- ((hweight32(alignment >> 32) +
- hweight32(alignment & 0xffffffff) != 1))) {
+ (hweight64(alignment) != 1)) {
HPSB_ERR("%s called with invalid alignment: 0x%048llx",
__FUNCTION__, (unsigned long long)alignment);
return retval;
OpenPOWER on IntegriCloud