Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363822 > unrolled thread

[PATCH 10/13] libnvdimm, pmem: clean up resource print / request

Started byDan Williams <dan.j.williams@intel.com>
First post2016-03-24 02:30 +0100
Last post2016-03-24 14:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 10/13] libnvdimm, pmem: clean up resource print / request Dan Williams <dan.j.williams@intel.com> - 2016-03-24 02:30 +0100
    Re: [PATCH 10/13] libnvdimm, pmem: clean up resource print / request Johannes Thumshirn <jthumshirn@suse.de> - 2016-03-24 14:50 +0100

#1363822 — [PATCH 10/13] libnvdimm, pmem: clean up resource print / request

FromDan Williams <dan.j.williams@intel.com>
Date2016-03-24 02:30 +0100
Subject[PATCH 10/13] libnvdimm, pmem: clean up resource print / request
Message-ID<rg2g3-3vC-21@gated-at.bofh.it>
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.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/pmem.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 97bc91b944b7..c9ae1673bb17 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -210,10 +210,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);
 	}
 

[toc] | [next] | [standalone]


#1364172

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2016-03-24 14:50 +0100
Message-ID<rgdOa-3jF-3@gated-at.bofh.it>
In reply to#1363822
On Mittwoch, 23. März 2016 18:26:13 CET Dan Williams wrote:
> 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.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web