diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-02 21:31:21 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-04 18:29:17 +0300 |
commit | 222e4adec52418dc1c80a30eff80b33ec954745e (patch) | |
tree | be47f12c6964036633e4105826efe6882f880ddc | |
parent | 93bbf5831dd1742a98c57b6415ee84ce35425067 (diff) | |
download | linux-222e4adec52418dc1c80a30eff80b33ec954745e.tar.xz |
... and a couple in net/9p
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | net/9p/trans_virtio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9fc6a56c506a..199bc76202d2 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -105,7 +105,7 @@ static struct list_head virtio_chan_list; /* How many bytes left in this page. */ static unsigned int rest_of_page(void *data) { - return PAGE_SIZE - ((unsigned long)data % PAGE_SIZE); + return PAGE_SIZE - offset_in_page(data); } /** @@ -365,7 +365,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan, return -ENOMEM; *need_drop = 0; - p -= (*offs = (unsigned long)p % PAGE_SIZE); + p -= (*offs = offset_in_page(p)); for (index = 0; index < nr_pages; index++) { if (is_vmalloc_addr(p)) (*pages)[index] = vmalloc_to_page(p); |