Skip to content

Commit

Permalink
libnvdimm, pmem: clean up resource print / request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Williams committed Apr 22, 2016
1 parent 030b99e commit 947df02
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/nvdimm/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 947df02

Please sign in to comment.