summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_tq.c
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-01-12 10:41:18 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2012-02-25 14:37:46 -0800
commitd0f474e501929acdbd116cca39ef083012f70f25 (patch)
treece4db92ff234d82c3b61ff05404ed4ae41551770 /drivers/target/iscsi/iscsi_target_tq.c
parentd5b4a21b3dc116b477c1b1b493233a73aacbb440 (diff)
downloadblackbird-op-linux-d0f474e501929acdbd116cca39ef083012f70f25.tar.gz
blackbird-op-linux-d0f474e501929acdbd116cca39ef083012f70f25.zip
target: Use LIST_HEAD()/DEFINE_MUTEX() for static objects
Instead of static struct list_head foo; static struct mutex bar; ... INIT_LIST_HEAD(&foo); mutex_init(&bar); just do static LIST_HEAD(foo); static DEFINE_MUTEX(bar); Also remove some superfluous struct list_head and spinlock_t initialization calls where the variables are already defined using macros that initialize them. This saves a decent amount of compiled code too: add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-178 (-178) function old new delta target_core_init_configfs 898 850 -48 core_scsi3_emulate_pro_preempt 1742 1683 -59 iscsi_thread_set_init 159 88 -71 Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tq.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_tq.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tq.c b/drivers/target/iscsi/iscsi_target_tq.c
index 0baac5bcebd4..977e1cf90e83 100644
--- a/drivers/target/iscsi/iscsi_target_tq.c
+++ b/drivers/target/iscsi/iscsi_target_tq.c
@@ -536,12 +536,6 @@ int iscsi_thread_set_init(void)
return -ENOMEM;
}
- spin_lock_init(&active_ts_lock);
- spin_lock_init(&inactive_ts_lock);
- spin_lock_init(&ts_bitmap_lock);
- INIT_LIST_HEAD(&active_ts_list);
- INIT_LIST_HEAD(&inactive_ts_list);
-
return 0;
}
OpenPOWER on IntegriCloud