From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: dan.j.williams@intel.com
Cc: linux-nvdimm@lists.01.org,
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: [PATCH V1 2/2] libnvdimm/nsio: Rename devm_nsio_enable/disable to devm_nsio_probe_enable/disable
Date: Tue, 15 Oct 2019 21:03:02 +0530 [thread overview]
Message-ID: <20191015153302.15750-2-aneesh.kumar@linux.ibm.com> (raw)
In-Reply-To: <20191015153302.15750-1-aneesh.kumar@linux.ibm.com>
These functions are now only used while probing namespace. Update the name
to indicate the same.
No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
drivers/dax/pmem/core.c | 4 ++--
drivers/nvdimm/claim.c | 8 ++++----
drivers/nvdimm/nd.h | 8 ++++----
drivers/nvdimm/pmem.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/dax/pmem/core.c b/drivers/dax/pmem/core.c
index 6eb6dfdf19bf..dec7b5a89d63 100644
--- a/drivers/dax/pmem/core.c
+++ b/drivers/dax/pmem/core.c
@@ -28,13 +28,13 @@ struct dev_dax *__dax_pmem_probe(struct device *dev, enum dev_dax_subsys subsys)
nsio = to_nd_namespace_io(&ndns->dev);
/* parse the 'pfn' info block via ->rw_bytes */
- rc = devm_nsio_enable(dev, nsio);
+ rc = devm_nsio_probe_enable(dev, nsio);
if (rc)
return ERR_PTR(rc);
rc = nvdimm_setup_pfn(nd_pfn, &pgmap);
if (rc)
return ERR_PTR(rc);
- devm_nsio_disable(dev, nsio);
+ devm_nsio_probe_disable(dev, nsio);
/* reserve the metadata area, device-dax will reserve the data */
pfn_sb = nd_pfn->pfn_sb;
diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
index 9f2e6646fcd4..93e26ca021ee 100644
--- a/drivers/nvdimm/claim.c
+++ b/drivers/nvdimm/claim.c
@@ -300,7 +300,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
return rc;
}
-int devm_nsio_enable(struct device *dev, struct nd_namespace_io *nsio)
+int devm_nsio_probe_enable(struct device *dev, struct nd_namespace_io *nsio)
{
struct resource *res = &nsio->res;
struct nd_namespace_common *ndns = &nsio->common;
@@ -323,9 +323,9 @@ int devm_nsio_enable(struct device *dev, struct nd_namespace_io *nsio)
return PTR_ERR_OR_ZERO(nsio->addr);
}
-EXPORT_SYMBOL_GPL(devm_nsio_enable);
+EXPORT_SYMBOL_GPL(devm_nsio_probe_enable);
-void devm_nsio_disable(struct device *dev, struct nd_namespace_io *nsio)
+void devm_nsio_probe_disable(struct device *dev, struct nd_namespace_io *nsio)
{
struct resource *res = &nsio->res;
@@ -333,4 +333,4 @@ void devm_nsio_disable(struct device *dev, struct nd_namespace_io *nsio)
devm_exit_badblocks(dev, &nsio->bb);
devm_release_mem_region(dev, res->start, resource_size(res));
}
-EXPORT_SYMBOL_GPL(devm_nsio_disable);
+EXPORT_SYMBOL_GPL(devm_nsio_probe_disable);
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index f51d51aa2f96..5ae8f17ff3d3 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -376,20 +376,20 @@ void nvdimm_badblocks_populate(struct nd_region *nd_region,
#define MAX_STRUCT_PAGE_SIZE 64
int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap);
-int devm_nsio_enable(struct device *dev, struct nd_namespace_io *nsio);
-void devm_nsio_disable(struct device *dev, struct nd_namespace_io *nsio);
+int devm_nsio_probe_enable(struct device *dev, struct nd_namespace_io *nsio);
+void devm_nsio_probe_disable(struct device *dev, struct nd_namespace_io *nsio);
#else
static inline int nvdimm_setup_pfn(struct nd_pfn *nd_pfn,
struct dev_pagemap *pgmap)
{
return -ENXIO;
}
-static inline int devm_nsio_enable(struct device *dev,
+static inline int devm_nsio_probe_enable(struct device *dev,
struct nd_namespace_io *nsio)
{
return -ENXIO;
}
-static inline void devm_nsio_disable(struct device *dev,
+static inline void devm_nsio_probe_disable(struct device *dev,
struct nd_namespace_io *nsio)
{
}
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 69956e49ec56..58706bae4d71 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -381,7 +381,7 @@ static int pmem_attach_disk(struct device *dev,
}
/* we're attaching a block device, disable raw namespace access */
- devm_nsio_disable(dev, nsio);
+ devm_nsio_probe_disable(dev, nsio);
dev_set_drvdata(dev, pmem);
pmem->phys_addr = res->start;
@@ -497,7 +497,7 @@ static int nd_pmem_probe(struct device *dev)
if (IS_ERR(ndns))
return PTR_ERR(ndns);
- if (devm_nsio_enable(dev, to_nd_namespace_io(&ndns->dev)))
+ if (devm_nsio_probe_enable(dev, to_nd_namespace_io(&ndns->dev)))
return -ENXIO;
if (is_nd_btt(dev))
--
2.21.0
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2019-10-15 15:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 15:33 [PATCH V1 1/2] libnvdimm/nsio: differentiate between probe mapping and runtime mapping Aneesh Kumar K.V
2019-10-15 15:33 ` Aneesh Kumar K.V [this message]
2019-10-15 22:02 ` Dan Williams
2019-10-16 5:29 ` Aneesh Kumar K.V
2019-10-16 16:04 ` Dan Williams
2019-10-16 16:58 ` Aneesh Kumar K.V
2019-10-16 19:05 ` Dan Williams
2019-10-17 2:43 ` Aneesh Kumar K.V
2019-10-17 3:04 ` Dan Williams
2019-10-17 3:18 ` Aneesh Kumar K.V
2019-10-17 4:12 ` Dan Williams
2019-10-17 7:10 ` Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191015153302.15750-2-aneesh.kumar@linux.ibm.com \
--to=aneesh.kumar@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=linux-nvdimm@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).