Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Dr. David Alan Gilbert and committed by
Ira Weiny
2318fa87 878a8e1e

-13
-11
drivers/nvdimm/claim.c
··· 56 56 return true; 57 57 } 58 58 59 - bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, 60 - struct nd_namespace_common **_ndns) 61 - { 62 - bool claimed; 63 - 64 - nvdimm_bus_lock(&attach->dev); 65 - claimed = __nd_attach_ndns(dev, attach, _ndns); 66 - nvdimm_bus_unlock(&attach->dev); 67 - return claimed; 68 - } 69 - 70 59 static bool is_idle(struct device *dev, struct nd_namespace_common *ndns) 71 60 { 72 61 struct nd_region *nd_region = to_nd_region(dev->parent);
-2
drivers/nvdimm/nd-core.h
··· 134 134 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns); 135 135 void nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); 136 136 void __nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); 137 - bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, 138 - struct nd_namespace_common **_ndns); 139 137 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, 140 138 struct nd_namespace_common **_ndns); 141 139 ssize_t nd_namespace_store(struct device *dev,