aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>2016-03-04 22:40:17 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-11 22:09:09 -0800
commitf53896608128f311b7c4982fa479ab7400be3164 (patch)
tree4aadf4914580f1200bbb6df02ed3ca862604efb1 /drivers/staging
parentstaging: rdma: hfi1: Replace ALIGN with PAGE_ALIGN (diff)
downloadlinux-dev-f53896608128f311b7c4982fa479ab7400be3164.tar.xz
linux-dev-f53896608128f311b7c4982fa479ab7400be3164.zip
staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED
mm.h contains a helper function PAGE_ALIGNED which tests whether an address is aligned to PAGE_SIZE instead of using IS_ALIGNED(expression, PAGE_SIZE) This change was made with the help of the following Coccinelle semantic patch: //<smpl> @@ expression e; symbol PAGE_SIZE; @@ ( - ALIGN(e, PAGE_SIZE) + PAGE_ALIGN(e) | - IS_ALIGNED(e, PAGE_SIZE) + PAGE_ALIGNED(e) ) //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rdma/hfi1/driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/driver.c b/drivers/staging/rdma/hfi1/driver.c
index 321852060213..ee50bbf64d39 100644
--- a/drivers/staging/rdma/hfi1/driver.c
+++ b/drivers/staging/rdma/hfi1/driver.c
@@ -246,7 +246,7 @@ static inline void *get_egrbuf(const struct hfi1_ctxtdata *rcd, u64 rhf,
*/
inline int hfi1_rcvbuf_validate(u32 size, u8 type, u16 *encoded)
{
- if (unlikely(!IS_ALIGNED(size, PAGE_SIZE)))
+ if (unlikely(!PAGE_ALIGNED(size)))
return 0;
if (unlikely(size < MIN_EAGER_BUFFER))
return 0;