diff mbox

[RFC,4/4] target: drop scsi_get_new_index

Message ID 1498209017-25110-5-git-send-email-mchristi@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Christie June 23, 2017, 9:10 a.m. UTC
scsi_get_new_index is not used anymore so drop it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
---
 drivers/target/target_core_internal.h  |  1 -
 drivers/target/target_core_transport.c | 20 --------------------
 include/target/target_core_base.h      |  8 --------
 3 files changed, 29 deletions(-)
diff mbox

Patch

diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h
index f30e8ac..a161d29 100644
--- a/drivers/target/target_core_internal.h
+++ b/drivers/target/target_core_internal.h
@@ -133,7 +133,6 @@  extern struct kmem_cache *se_tmr_req_cache;
 
 int	init_se_kmem_caches(void);
 void	release_se_kmem_caches(void);
-u32	scsi_get_new_index(scsi_index_t);
 void	transport_subsystem_check_init(void);
 int	transport_cmd_finish_abort(struct se_cmd *, int);
 unsigned char *transport_dump_cmd_direction(struct se_cmd *);
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a5ecec8..eee92a2 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -178,26 +178,6 @@  void release_se_kmem_caches(void)
 	kmem_cache_destroy(t10_alua_lba_map_mem_cache);
 }
 
-/* This code ensures unique mib indexes are handed out. */
-static DEFINE_SPINLOCK(scsi_mib_index_lock);
-static u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX];
-
-/*
- * Allocate a new row index for the entry type specified
- */
-u32 scsi_get_new_index(scsi_index_t type)
-{
-	u32 new_index;
-
-	BUG_ON((type < 0) || (type >= SCSI_INDEX_TYPE_MAX));
-
-	spin_lock(&scsi_mib_index_lock);
-	new_index = ++scsi_mib_index[type];
-	spin_unlock(&scsi_mib_index_lock);
-
-	return new_index;
-}
-
 void transport_subsystem_check_init(void)
 {
 	int ret;
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index d275a39..220e360 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -214,14 +214,6 @@  enum tcm_tmrsp_table {
 	TMR_FUNCTION_REJECTED		= 5,
 };
 
-/*
- * Used for target SCSI statistics
- */
-typedef enum {
-	SCSI_INST_INDEX,
-	SCSI_INDEX_TYPE_MAX
-} scsi_index_t;
-
 struct se_cmd;
 
 struct t10_alua_lba_map_member {