summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/pmem.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-03-22 08:28:40 +0300
committerDan Williams <dan.j.williams@intel.com>2016-04-22 22:26:23 +0300
commit947df02d255a6a81a3832e831c5ca02078cfd529 (patch)
tree2da52b4eee0f0e1af712623bd184e23935147233 /drivers/nvdimm/pmem.c
parent030b99e39cad33b104474fbe688e0eb23d8209b4 (diff)
downloadlinux-947df02d255a6a81a3832e831c5ca02078cfd529.tar.xz
libnvdimm, pmem: clean up resource print / request
The leading '0x' in front of %pa is redundant, also we can just use %pR to simplify the print statement. The request parameters can be directly taken from the resource as well. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r--drivers/nvdimm/pmem.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index d936defdc1e2..67d48e2e8ca2 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -224,10 +224,9 @@ static struct pmem_device *pmem_alloc(struct device *dev,
if (!arch_has_wmb_pmem())
dev_warn(dev, "unable to guarantee persistence of writes\n");
- if (!devm_request_mem_region(dev, pmem->phys_addr, pmem->size,
- dev_name(dev))) {
- dev_warn(dev, "could not reserve region [0x%pa:0x%zx]\n",
- &pmem->phys_addr, pmem->size);
+ if (!devm_request_mem_region(dev, res->start, resource_size(res),
+ dev_name(dev))) {
+ dev_warn(dev, "could not reserve region %pR\n", res);
return ERR_PTR(-EBUSY);
}