提交 947df02d 编写于 作者: D Dan Williams

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: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 030b99e3
...@@ -224,10 +224,9 @@ static struct pmem_device *pmem_alloc(struct device *dev, ...@@ -224,10 +224,9 @@ static struct pmem_device *pmem_alloc(struct device *dev,
if (!arch_has_wmb_pmem()) if (!arch_has_wmb_pmem())
dev_warn(dev, "unable to guarantee persistence of writes\n"); dev_warn(dev, "unable to guarantee persistence of writes\n");
if (!devm_request_mem_region(dev, pmem->phys_addr, pmem->size, if (!devm_request_mem_region(dev, res->start, resource_size(res),
dev_name(dev))) { dev_name(dev))) {
dev_warn(dev, "could not reserve region [0x%pa:0x%zx]\n", dev_warn(dev, "could not reserve region %pR\n", res);
&pmem->phys_addr, pmem->size);
return ERR_PTR(-EBUSY); return ERR_PTR(-EBUSY);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册