Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3645
b: refs/heads/master
c: 4844296
h: refs/heads/master
i:
  3643: a3cd3c1
v: v3
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Jun 27, 2005
1 parent b4dab7d commit 13eac39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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: dae4c1d2362292ccd3318ff67d18aa5c22ee820c
refs/heads/master: 48442962ebccec92d8a65f465420423cd2ce0bc8
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/packer.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void ib_pack(const struct ib_field *desc,
else
val = 0;

mask = cpu_to_be64(((1ull << desc[i].size_bits) - 1) << shift);
mask = cpu_to_be64((~0ull >> (64 - desc[i].size_bits)) << shift);
addr = (__be64 *) ((__be32 *) buf + desc[i].offset_words);
*addr = (*addr & ~mask) | (cpu_to_be64(val) & mask);
} else {
Expand Down Expand Up @@ -176,7 +176,7 @@ void ib_unpack(const struct ib_field *desc,
__be64 *addr;

shift = 64 - desc[i].offset_bits - desc[i].size_bits;
mask = ((1ull << desc[i].size_bits) - 1) << shift;
mask = (~0ull >> (64 - desc[i].size_bits)) << shift;
addr = (__be64 *) buf + desc[i].offset_words;
val = (be64_to_cpup(addr) & mask) >> shift;
value_write(desc[i].struct_offset_bytes,
Expand Down

0 comments on commit 13eac39

Please sign in to comment.