staging: lustre: remove libcfs_init_string function
authorJames Simmons <jsimmons@infradead.org>
Thu, 22 Oct 2015 01:52:41 +0000 (21:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:52:21 +0000 (18:52 -0700)
All the function libcfs_init_string did was initialize
a spinlock. We can initialize the spinlock statically
instead.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/lnet/lnet/nidstrings.c
drivers/staging/lustre/lustre/libcfs/module.c

index 385ced15c74298f3f274347781351465c01d436c..4d74e8af5088deec183c6d83cc16a5cfd1dc15fa 100644 (file)
@@ -152,8 +152,6 @@ extern struct miscdevice libcfs_dev;
 extern char lnet_upcall[1024];
 extern char lnet_debug_log_upcall[1024];
 
-extern void libcfs_init_nidstrings(void);
-
 extern struct cfs_psdev_ops libcfs_psdev_ops;
 
 extern struct cfs_wi_sched *cfs_sched_rehash;
index 81ec3a8ec650d6b03104d1e6599be11b7adce883..fdbdf0668aafcfb9145d5816dd51f574d88396b7 100644 (file)
 static char      libcfs_nidstrings[LNET_NIDSTR_COUNT][LNET_NIDSTR_SIZE];
 static int       libcfs_nidstring_idx;
 
-static spinlock_t libcfs_nidstring_lock;
-
-void libcfs_init_nidstrings(void)
-{
-       spin_lock_init(&libcfs_nidstring_lock);
-}
-EXPORT_SYMBOL(libcfs_init_nidstrings);
+static DEFINE_SPINLOCK(libcfs_nidstring_lock);
 
 char *
 libcfs_next_nidstring(void)
index 0d9b223e71d6de858d9233641df64077e959fca9..50e8fd23fa17fdf70307b4201fa4018d37ccfac8 100644 (file)
@@ -701,8 +701,6 @@ static int init_libcfs_module(void)
 {
        int rc;
 
-       libcfs_init_nidstrings();
-
        rc = libcfs_debug_init(5 * 1024 * 1024);
        if (rc < 0) {
                pr_err("LustreError: libcfs_debug_init: %d\n", rc);