kobject: Remove unused functions
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 12 Jan 2025 14:49:07 +0000 (14:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2025 18:45:35 +0000 (19:45 +0100)
kobj_ns_initial() and kobj_ns_netlink() were adde din 2010 by
commit bc451f205823 ("kobj: Add basic infrastructure for dealing with
namespaces.")
but have remained unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250112144907.270272-1-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/kobject_ns.h
lib/kobject.c

index be707748e7cec190865f21ddbe416a20261609e9..150fe2ae1b6b257ad2f1466e98da4dc312c848b0 100644 (file)
@@ -52,8 +52,6 @@ const struct kobj_ns_type_operations *kobj_ns_ops(const struct kobject *kobj);
 
 bool kobj_ns_current_may_mount(enum kobj_ns_type type);
 void *kobj_ns_grab_current(enum kobj_ns_type type);
-const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk);
-const void *kobj_ns_initial(enum kobj_ns_type type);
 void kobj_ns_drop(enum kobj_ns_type type, void *ns);
 
 #endif /* _LINUX_KOBJECT_NS_H */
index 72fa20f405f1520a63dd50d9aa37f6609306eb3e..abe5f5b856ceb024e7600c67741dbc66be5d1472 100644 (file)
@@ -1096,30 +1096,6 @@ void *kobj_ns_grab_current(enum kobj_ns_type type)
 }
 EXPORT_SYMBOL_GPL(kobj_ns_grab_current);
 
-const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk)
-{
-       const void *ns = NULL;
-
-       spin_lock(&kobj_ns_type_lock);
-       if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type])
-               ns = kobj_ns_ops_tbl[type]->netlink_ns(sk);
-       spin_unlock(&kobj_ns_type_lock);
-
-       return ns;
-}
-
-const void *kobj_ns_initial(enum kobj_ns_type type)
-{
-       const void *ns = NULL;
-
-       spin_lock(&kobj_ns_type_lock);
-       if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type])
-               ns = kobj_ns_ops_tbl[type]->initial_ns();
-       spin_unlock(&kobj_ns_type_lock);
-
-       return ns;
-}
-
 void kobj_ns_drop(enum kobj_ns_type type, void *ns)
 {
        spin_lock(&kobj_ns_type_lock);