diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 22:50:10 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 22:50:10 -0400 |
commit | aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f (patch) | |
tree | 57ca3e27227695acbd97408eabb0f967726c3b51 /drivers/infiniband/core/packer.c | |
parent | f45727d52d1581e9ff4df9d1a12a60789ad2d1eb (diff) | |
parent | 245ac8738b0b840552d56b842e70e750d65911cc (diff) | |
download | kernel_samsung_espresso10-aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f.zip kernel_samsung_espresso10-aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f.tar.gz kernel_samsung_espresso10-aa8f6dfd355021b4dd8b74b0588fd6fd8f21b79f.tar.bz2 |
Merge /spare/repo/netdev-2.6 branch 'ieee80211'
Diffstat (limited to 'drivers/infiniband/core/packer.c')
-rw-r--r-- | drivers/infiniband/core/packer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/packer.c b/drivers/infiniband/core/packer.c index 5f15fef..eb5ff54 100644 --- a/drivers/infiniband/core/packer.c +++ b/drivers/infiniband/core/packer.c @@ -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 { @@ -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, |