]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
libnvdimm: Remove unused nd_attach_ndns
authorDr. David Alan Gilbert <linux@treblig.org>
Thu, 20 Feb 2025 00:45:38 +0000 (00:45 +0000)
committerIra Weiny <ira.weiny@intel.com>
Mon, 3 Mar 2025 14:03:43 +0000 (08:03 -0600)
nd_attach_ndns() hasn't been used since 2017's
commit 452bae0aede7 ("libnvdimm: fix nvdimm_bus_lock() vs device_lock()
ordering")

Remove it.

Note the __ version is still used and has been left.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://patch.msgid.link/20250220004538.84585-3-linux@treblig.org
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
drivers/nvdimm/claim.c
drivers/nvdimm/nd-core.h

index 9e84ab411564f9d5e7ceb687c6491562564552e3..51614651d2e75a7be5361363e7d85913e3a96733 100644 (file)
@@ -56,17 +56,6 @@ bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,
        return true;
 }
 
-bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,
-               struct nd_namespace_common **_ndns)
-{
-       bool claimed;
-
-       nvdimm_bus_lock(&attach->dev);
-       claimed = __nd_attach_ndns(dev, attach, _ndns);
-       nvdimm_bus_unlock(&attach->dev);
-       return claimed;
-}
-
 static bool is_idle(struct device *dev, struct nd_namespace_common *ndns)
 {
        struct nd_region *nd_region = to_nd_region(dev->parent);
index 2b37b7fc4fefd805a347d5827c557f1e58fbb3b2..bfc6bfeb6e24811c33d0f3cf467a0fe2eb922bb9 100644 (file)
@@ -134,8 +134,6 @@ void get_ndd(struct nvdimm_drvdata *ndd);
 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
 void nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns);
 void __nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns);
-bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,
-               struct nd_namespace_common **_ndns);
 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,
                struct nd_namespace_common **_ndns);
 ssize_t nd_namespace_store(struct device *dev,