Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24200
b: refs/heads/master
c: 37d5411
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Mar 26, 2006
1 parent dbfc070 commit b36ee94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9bebd6f3acee68fa07d44726895b40733cb1dc0
refs/heads/master: 37d54111c133bea05fbae9dfe6d3d61a1b19c09b
3 changes: 1 addition & 2 deletions trunk/drivers/ieee1394/highlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 2 additions & 17 deletions trunk/lib/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,33 +253,18 @@ int __bitmap_subset(const unsigned long *bitmap1,
}
EXPORT_SYMBOL(__bitmap_subset);

#if BITS_PER_LONG == 32
int __bitmap_weight(const unsigned long *bitmap, int bits)
{
int k, w = 0, lim = bits/BITS_PER_LONG;

for (k = 0; k < lim; k++)
w += hweight32(bitmap[k]);
w += hweight_long(bitmap[k]);

if (bits % BITS_PER_LONG)
w += hweight32(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));
w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));

return w;
}
#else
int __bitmap_weight(const unsigned long *bitmap, int bits)
{
int k, w = 0, lim = bits/BITS_PER_LONG;

for (k = 0; k < lim; k++)
w += hweight64(bitmap[k]);

if (bits % BITS_PER_LONG)
w += hweight64(bitmap[k] & BITMAP_LAST_WORD_MASK(bits));

return w;
}
#endif
EXPORT_SYMBOL(__bitmap_weight);

/*
Expand Down

0 comments on commit b36ee94

Please sign in to comment.