From: Amitoj Kaur Chawla Date: Fri, 16 Oct 2015 16:40:25 +0000 (+0530) Subject: staging: rdma: amso1100: Prefer using BIT Macro X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b49f3b23428433dc1e8bf323d1c39be73f1605e5;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c index 956d76b111b0..25632158a52a 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);