diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2015-10-16 16:40:25 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 06:02:55 (GMT) |
commit | b49f3b23428433dc1e8bf323d1c39be73f1605e5 (patch) | |
tree | 6003f5a3ce198fddd975e2a5e0e3f75464da400e /drivers/staging/rdma/amso1100 | |
parent | d32cf44a62716d4fa9e9d8a5d7201a89d936fe5e (diff) | |
download | linux-b49f3b23428433dc1e8bf323d1c39be73f1605e5.tar.xz |
staging: rdma: amso1100: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro
The semantic patch used to find this is:
@@ int g; @@
-(1 << g)
+BIT(g)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/amso1100')
-rw-r--r-- | drivers/staging/rdma/amso1100/c2_provider.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c index 956d76b..2563215 100644 --- a/drivers/staging/rdma/amso1100/c2_provider.c +++ b/drivers/staging/rdma/amso1100/c2_provider.c @@ -372,7 +372,7 @@ static struct ib_mr *c2_reg_phys_mr(struct ib_pd *ib_pd, total_len += buffer_list[i].size; pbl_depth += ALIGN(buffer_list[i].size, - (1 << page_shift)) >> page_shift; + BIT(page_shift)) >> page_shift; } page_list = vmalloc(sizeof(u64) * pbl_depth); @@ -387,7 +387,7 @@ static struct ib_mr *c2_reg_phys_mr(struct ib_pd *ib_pd, int naddrs; naddrs = ALIGN(buffer_list[i].size, - (1 << page_shift)) >> page_shift; + BIT(page_shift)) >> page_shift; for (k = 0; k < naddrs; k++) page_list[j++] = (buffer_list[i].addr + (k << page_shift)); @@ -408,7 +408,7 @@ static struct ib_mr *c2_reg_phys_mr(struct ib_pd *ib_pd, (unsigned long long) page_list[0], (unsigned long long) page_list[pbl_depth-1]); err = c2_nsmr_register_phys_kern(to_c2dev(ib_pd->device), page_list, - (1 << page_shift), pbl_depth, + BIT(page_shift), pbl_depth, total_len, 0, iova_start, c2_convert_access(acc), mr); vfree(page_list); |