From: Dr. David Alan Gilbert Date: Thu, 20 Feb 2025 00:45:38 +0000 (+0000) Subject: libnvdimm: Remove unused nd_attach_ndns X-Git-Tag: v6.15-rc1~44^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2318fa87f808362994dee2773a7d3307c1cebabd;p=thirdparty%2Fkernel%2Fstable.git libnvdimm: Remove unused nd_attach_ndns 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 Reviewed-by: Ira Weiny Link: https://patch.msgid.link/20250220004538.84585-3-linux@treblig.org Signed-off-by: Ira Weiny --- diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c index 9e84ab411564f..51614651d2e75 100644 --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -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); diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index 2b37b7fc4fefd..bfc6bfeb6e248 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h @@ -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,