diff options
author | 2015-04-03 12:22:55 +0000 | |
---|---|---|
committer | 2015-04-03 12:22:55 +0000 | |
commit | 7fc0018a3eef37edefcb2dbfa7723105f6fec5d9 (patch) | |
tree | f51c546b163a6233228f1096f1b8c6df7ee7f985 | |
parent | The combination of -c and -o is not specified by POSIX. In fact, the call (diff) | |
download | wireguard-openbsd-7fc0018a3eef37edefcb2dbfa7723105f6fec5d9.tar.xz wireguard-openbsd-7fc0018a3eef37edefcb2dbfa7723105f6fec5d9.zip |
Translate PAGE_MASK usage for the way it is defined in our kernel.
This code is not called.
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_bo_vm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/ttm/ttm_bo_vm.c b/sys/dev/pci/drm/ttm/ttm_bo_vm.c index e0b9a887e80..b918a0381d3 100644 --- a/sys/dev/pci/drm/ttm/ttm_bo_vm.c +++ b/sys/dev/pci/drm/ttm/ttm_bo_vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttm_bo_vm.c,v 1.5 2015/02/11 07:01:37 jsg Exp $ */ +/* $OpenBSD: ttm_bo_vm.c,v 1.6 2015/04/03 12:22:55 jsg Exp $ */ /************************************************************************** * * Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA @@ -403,7 +403,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp, goto out_unref; } - page_offset = *f_pos & ~PAGE_MASK; + page_offset = *f_pos & PAGE_MASK; io_size = bo->num_pages - kmap_offset; io_size = (io_size << PAGE_SHIFT) - page_offset; if (count < io_size) @@ -472,7 +472,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf, if (unlikely(kmap_offset >= bo->num_pages)) return -EFBIG; - page_offset = *f_pos & ~PAGE_MASK; + page_offset = *f_pos & PAGE_MASK; io_size = bo->num_pages - kmap_offset; io_size = (io_size << PAGE_SHIFT) - page_offset; if (count < io_size) |