diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 09:38:43 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 09:38:43 +0300 |
commit | 736163671bcb163fc82600b46c83dfa89d532d95 (patch) | |
tree | 0639dc9d9fa180450b4e8fbda706eaae5f1876da /tools/testing/nvdimm/dax-dev.c | |
parent | d5483feda85a8f39ee2e940e279547c686aac30c (diff) | |
parent | 1ef97fe4f8abd3317d5c3c860f990e02c2633959 (diff) | |
download | linux-736163671bcb163fc82600b46c83dfa89d532d95.tar.xz |
Merge branch 'for-4.12/dax' into libnvdimm-for-next
Diffstat (limited to 'tools/testing/nvdimm/dax-dev.c')
-rw-r--r-- | tools/testing/nvdimm/dax-dev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/testing/nvdimm/dax-dev.c b/tools/testing/nvdimm/dax-dev.c index e89721d8924c..36ee3d8797c3 100644 --- a/tools/testing/nvdimm/dax-dev.c +++ b/tools/testing/nvdimm/dax-dev.c @@ -14,28 +14,28 @@ #include <linux/mm.h> #include "../../../drivers/dax/dax-private.h" -phys_addr_t dax_pgoff_to_phys(struct dax_dev *dax_dev, pgoff_t pgoff, +phys_addr_t dax_pgoff_to_phys(struct dev_dax *dev_dax, pgoff_t pgoff, unsigned long size) { struct resource *res; phys_addr_t addr; int i; - for (i = 0; i < dax_dev->num_resources; i++) { - res = &dax_dev->res[i]; + for (i = 0; i < dev_dax->num_resources; i++) { + res = &dev_dax->res[i]; addr = pgoff * PAGE_SIZE + res->start; if (addr >= res->start && addr <= res->end) break; pgoff -= PHYS_PFN(resource_size(res)); } - if (i < dax_dev->num_resources) { - res = &dax_dev->res[i]; + if (i < dev_dax->num_resources) { + res = &dev_dax->res[i]; if (addr + size - 1 <= res->end) { if (get_nfit_res(addr)) { struct page *page; - if (dax_dev->region->align > PAGE_SIZE) + if (dev_dax->region->align > PAGE_SIZE) return -1; page = vmalloc_to_page((void *)addr); |