diff options
author | Geliang Tang <geliangtang@163.com> | 2015-11-25 21:49:27 +0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-01-06 13:39:59 -0800 |
commit | b75d8063c09b5b4dc230dfbb2ddc1a50cf06b897 (patch) | |
tree | e7d1cb5798498c5cc2ecef7d5d83213ed4f02b08 /drivers/target/target_core_user.c | |
parent | 234bdbc49d118431b1ebeee228bd1b3105f89e2a (diff) | |
download | blackbird-op-linux-b75d8063c09b5b4dc230dfbb2ddc1a50cf06b897.tar.gz blackbird-op-linux-b75d8063c09b5b4dc230dfbb2ddc1a50cf06b897.zip |
target: use offset_in_page macro
Use offset_in_page macro instead of (addr & ~PAGE_MASK).
Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_user.c')
-rw-r--r-- | drivers/target/target_core_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 937cebf76633..d5477c0d730a 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -194,7 +194,7 @@ static struct tcmu_cmd *tcmu_alloc_cmd(struct se_cmd *se_cmd) static inline void tcmu_flush_dcache_range(void *vaddr, size_t size) { - unsigned long offset = (unsigned long) vaddr & ~PAGE_MASK; + unsigned long offset = offset_in_page(vaddr); size = round_up(size+offset, PAGE_SIZE); vaddr -= offset; |