projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
030b99e
)
libnvdimm, pmem: clean up resource print / request
author
Dan Williams
<
[email protected]
>
Tue, 22 Mar 2016 05:28:40 +0000
(22:28 -0700)
committer
Dan Williams
<
[email protected]
>
Fri, 22 Apr 2016 19:26:23 +0000
(12:26 -0700)
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 <
[email protected]
>
Signed-off-by: Dan Williams <
[email protected]
>
drivers/nvdimm/pmem.c
patch
|
blob
|
history
diff --git
a/drivers/nvdimm/pmem.c
b/drivers/nvdimm/pmem.c
index d936defdc1e2082e3db68f9c3692f2193adfec5f..67d48e2e8ca21a9b9ef917a1e8110f02c11ca3e6 100644
(file)
--- 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);
}