diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2015-10-16 16:39:08 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 06:02:55 (GMT) |
commit | d32cf44a62716d4fa9e9d8a5d7201a89d936fe5e (patch) | |
tree | 86f82e7ae89f1bc9b9be5d7e7c7ec6a30d15087e /drivers/staging/rdma/hfi1 | |
parent | 0bfe513cac8cf0655489e0e6dd5e7dd3cb2b5927 (diff) | |
download | linux-d32cf44a62716d4fa9e9d8a5d7201a89d936fe5e.tar.xz |
staging: rdma: hfi1: 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/hfi1')
-rw-r--r-- | drivers/staging/rdma/hfi1/file_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/staging/rdma/hfi1/file_ops.c index 7d28680..cbaf4f7 100644 --- a/drivers/staging/rdma/hfi1/file_ops.c +++ b/drivers/staging/rdma/hfi1/file_ops.c @@ -508,7 +508,7 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) case PIO_BUFS_SOP: memaddr = ((dd->physaddr + TXE_PIO_SEND) + /* chip pio base */ - (uctxt->sc->hw_context * (1 << 16))) + + (uctxt->sc->hw_context * BIT(16))) + /* 64K PIO space / ctxt */ (type == PIO_BUFS_SOP ? (TXE_PIO_SIZE / 2) : 0); /* sop? */ |