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

kobject: Remove unused functions

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>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
ee9c6938 dd19f411

-26
-2
include/linux/kobject_ns.h
··· 52 52 53 53 bool kobj_ns_current_may_mount(enum kobj_ns_type type); 54 54 void *kobj_ns_grab_current(enum kobj_ns_type type); 55 - const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); 56 - const void *kobj_ns_initial(enum kobj_ns_type type); 57 55 void kobj_ns_drop(enum kobj_ns_type type, void *ns); 58 56 59 57 #endif /* _LINUX_KOBJECT_NS_H */
-24
lib/kobject.c
··· 1096 1096 } 1097 1097 EXPORT_SYMBOL_GPL(kobj_ns_grab_current); 1098 1098 1099 - const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk) 1100 - { 1101 - const void *ns = NULL; 1102 - 1103 - spin_lock(&kobj_ns_type_lock); 1104 - if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type]) 1105 - ns = kobj_ns_ops_tbl[type]->netlink_ns(sk); 1106 - spin_unlock(&kobj_ns_type_lock); 1107 - 1108 - return ns; 1109 - } 1110 - 1111 - const void *kobj_ns_initial(enum kobj_ns_type type) 1112 - { 1113 - const void *ns = NULL; 1114 - 1115 - spin_lock(&kobj_ns_type_lock); 1116 - if (kobj_ns_type_is_valid(type) && kobj_ns_ops_tbl[type]) 1117 - ns = kobj_ns_ops_tbl[type]->initial_ns(); 1118 - spin_unlock(&kobj_ns_type_lock); 1119 - 1120 - return ns; 1121 - } 1122 - 1123 1099 void kobj_ns_drop(enum kobj_ns_type type, void *ns) 1124 1100 { 1125 1101 spin_lock(&kobj_ns_type_lock);