summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2015-10-21 21:52:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-24 18:52:21 -0700
commit43049a83b57118753abcd9fa2141a0ce64533680 (patch)
tree973fa5bc12b86cc1a175f0662e02e7f51f2890d5 /drivers/staging/lustre
parent47ca6ec2673eff06e6befab2c04528c5b1f3c5bb (diff)
downloadlinux-43049a83b57118753abcd9fa2141a0ce64533680.tar.bz2
staging: lustre: remove libcfs_init_string function
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>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs.h2
-rw-r--r--drivers/staging/lustre/lnet/lnet/nidstrings.c8
-rw-r--r--drivers/staging/lustre/lustre/libcfs/module.c2
3 files changed, 1 insertions, 11 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 385ced15c742..4d74e8af5088 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -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;
diff --git a/drivers/staging/lustre/lnet/lnet/nidstrings.c b/drivers/staging/lustre/lnet/lnet/nidstrings.c
index 81ec3a8ec650..fdbdf0668aaf 100644
--- a/drivers/staging/lustre/lnet/lnet/nidstrings.c
+++ b/drivers/staging/lustre/lnet/lnet/nidstrings.c
@@ -61,13 +61,7 @@
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)
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index 0d9b223e71d6..50e8fd23fa17 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -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);