diff options
author | Kay Sievers <kay@vrfy.org> | 2013-05-17 20:33:37 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-05-17 20:33:37 +0200 |
commit | b40d52eb207c938c15aa600aba43c2cab33875ef (patch) | |
tree | 3549f6f037b34e20e0afa914b8ed0b2d173b1a7e | |
parent | 47fbe21f03f721dac391edfde0d6585bc308524e (diff) | |
download | kdbus-bus-b40d52eb207c938c15aa600aba43c2cab33875ef.tar.gz kdbus-bus-b40d52eb207c938c15aa600aba43c2cab33875ef.tar.bz2 kdbus-bus-b40d52eb207c938c15aa600aba43c2cab33875ef.zip |
use common IS_ALIGNED() for PAGE_SIZE check
-rw-r--r-- | connection.c | 4 | ||||
-rw-r--r-- | internal.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/connection.c b/connection.c index f16014d3798..c2d41a50690 100644 --- a/connection.c +++ b/connection.c @@ -1155,8 +1155,8 @@ static long kdbus_conn_ioctl_ep(struct file *file, unsigned int cmd, } /* enforce page alignment and page granularity */ - if (!KDBUS_IS_ALIGNED_PAGE(item->vec.address) || - !KDBUS_IS_ALIGNED_PAGE(item->vec.size)) { + if (!IS_ALIGNED(item->vec.address, PAGE_SIZE) || + !IS_ALIGNED(item->vec.size, PAGE_SIZE)) { ret = -EFAULT; break; } diff --git a/internal.h b/internal.h index 6ff560fcf52..f8e460fa28c 100644 --- a/internal.h +++ b/internal.h @@ -39,7 +39,6 @@ #define KDBUS_ALIGN8(s) ALIGN((s), 8) #define KDBUS_IS_ALIGNED8(s) (IS_ALIGNED(s, 8)) -#define KDBUS_IS_ALIGNED_PAGE(s) (IS_ALIGNED(s, PAGE_SIZE)) #define KDBUS_ITEM_HEADER_SIZE offsetof(struct kdbus_item, data) #define KDBUS_ITEM_SIZE(s) KDBUS_ALIGN8((s) + KDBUS_ITEM_HEADER_SIZE) |