[PATCH 4/5] target: Drop unused TFO->is_state_remove() API caller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

This patch ddrops the unused TFO->is_state_remove() API caller from
target-core and removes stub usage from lio-core.git fabric module code.

Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c         |    6 ------
 drivers/scsi/qla2xxx/tcm_qla2xxx.c            |    7 -------
 drivers/target/iscsi/iscsi_target_configfs.c  |    8 --------
 drivers/target/loopback/tcm_loop.c            |    9 ---------
 drivers/target/target_core_configfs.c         |    4 ----
 drivers/target/tcm_fc/tcm_fc.h                |    1 -
 drivers/target/tcm_fc/tfc_cmd.c               |    5 -----
 drivers/target/tcm_fc/tfc_conf.c              |    1 -
 drivers/target/tcm_vhost/tcm_vhost_configfs.c |    1 -
 drivers/target/tcm_vhost/tcm_vhost_fabric.c   |    5 -----
 drivers/target/tcm_vhost/tcm_vhost_fabric.h   |    1 -
 drivers/target/usb-gadget/configfs.c          |    1 -
 drivers/target/usb-gadget/fabric.c            |    5 -----
 drivers/target/usb-gadget/usbg.h              |    1 -
 include/target/target_core_fabric.h           |    1 -
 15 files changed, 0 insertions(+), 56 deletions(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 08a5cda..e4e7b42 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3506,11 +3506,6 @@ static u16 srpt_get_fabric_sense_len(void)
 	return 0;
 }
 
-static int srpt_is_state_remove(struct se_cmd *se_cmd)
-{
-	return 0;
-}
-
 /**
  * srpt_parse_i_port_id() - Parse an initiator port ID.
  * @name: ASCII representation of a 128-bit initiator port ID.
@@ -3890,7 +3885,6 @@ static struct target_core_fabric_ops srpt_template = {
 	.queue_tm_rsp			= srpt_queue_response,
 	.get_fabric_sense_len		= srpt_get_fabric_sense_len,
 	.set_fabric_sense_len		= srpt_set_fabric_sense_len,
-	.is_state_remove		= srpt_is_state_remove,
 	/*
 	 * Setup function pointers for generic logic in
 	 * target_core_fabric_configfs.c
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 8d7732f..85eec3e 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -737,11 +737,6 @@ u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
 	return 0;
 }
 
-int tcm_qla2xxx_is_state_remove(struct se_cmd *se_cmd)
-{
-	return 0;
-}
-
 /* Local pointer to allocated TCM configfs fabric module */
 struct target_fabric_configfs *tcm_qla2xxx_fabric_configfs;
 struct target_fabric_configfs *tcm_qla2xxx_npiv_fabric_configfs;
@@ -1753,7 +1748,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = {
 	.queue_tm_rsp			= tcm_qla2xxx_queue_tm_rsp,
 	.get_fabric_sense_len		= tcm_qla2xxx_get_fabric_sense_len,
 	.set_fabric_sense_len		= tcm_qla2xxx_set_fabric_sense_len,
-	.is_state_remove		= tcm_qla2xxx_is_state_remove,
 	/*
 	 * Setup function pointers for generic logic in target_core_fabric_configfs.c
 	 */
@@ -1801,7 +1795,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
 	.queue_tm_rsp			= tcm_qla2xxx_queue_tm_rsp,
 	.get_fabric_sense_len		= tcm_qla2xxx_get_fabric_sense_len,
 	.set_fabric_sense_len		= tcm_qla2xxx_set_fabric_sense_len,
-	.is_state_remove		= tcm_qla2xxx_is_state_remove,
 	/*
 	 * Setup function pointers for generic logic in target_core_fabric_configfs.c
 	 */
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index d19704b..3550d5f 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -1503,13 +1503,6 @@ static int iscsi_get_cmd_state(struct se_cmd *se_cmd)
 	return cmd->i_state;
 }
 
-static int iscsi_is_state_remove(struct se_cmd *se_cmd)
-{
-	struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
-
-	return (cmd->i_state == ISTATE_REMOVE);
-}
-
 static u32 lio_sess_get_index(struct se_session *se_sess)
 {
 	struct iscsi_session *sess = se_sess->fabric_sess_ptr;
@@ -1779,7 +1772,6 @@ int iscsi_target_register_configfs(void)
 	fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp;
 	fabric->tf_ops.set_fabric_sense_len = &lio_set_fabric_sense_len;
 	fabric->tf_ops.get_fabric_sense_len = &lio_get_fabric_sense_len;
-	fabric->tf_ops.is_state_remove = &iscsi_is_state_remove;
 	/*
 	 * Setup function pointers for generic logic in target_core_fabric_configfs.c
 	 */
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 7b1ebce..5eb6792 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -736,14 +736,6 @@ static u32 tcm_loop_get_inst_index(struct se_portal_group *se_tpg)
 	return 1;
 }
 
-static int tcm_loop_is_state_remove(struct se_cmd *se_cmd)
-{
-	/*
-	 * Assume struct scsi_cmnd is not in remove state..
-	 */
-	return 0;
-}
-
 static u32 tcm_loop_sess_get_index(struct se_session *se_sess)
 {
 	return 1;
@@ -1386,7 +1378,6 @@ static int tcm_loop_register_configfs(void)
 	fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp;
 	fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len;
 	fabric->tf_ops.get_fabric_sense_len = &tcm_loop_get_fabric_sense_len;
-	fabric->tf_ops.is_state_remove = &tcm_loop_is_state_remove;
 
 	tf_cg = &fabric->tf_group;
 	/*
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 24e0529..11d5144 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -465,10 +465,6 @@ static int target_fabric_tf_ops_check(
 		pr_err("Missing tfo->get_fabric_sense_len()\n");
 		return -EINVAL;
 	}
-	if (!tfo->is_state_remove) {
-		pr_err("Missing tfo->is_state_remove()\n");
-		return -EINVAL;
-	}
 	/*
 	 * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn()
 	 * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in
diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h
index 738d018..0a07bb7 100644
--- a/drivers/target/tcm_fc/tcm_fc.h
+++ b/drivers/target/tcm_fc/tcm_fc.h
@@ -160,7 +160,6 @@ int ft_write_pending_status(struct se_cmd *);
 u32 ft_get_task_tag(struct se_cmd *);
 int ft_get_cmd_state(struct se_cmd *);
 int ft_queue_tm_resp(struct se_cmd *);
-int ft_is_state_remove(struct se_cmd *);
 
 /*
  * other internal functions.
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index 63f158d..346e72d 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -244,11 +244,6 @@ int ft_get_cmd_state(struct se_cmd *se_cmd)
 	return 0;
 }
 
-int ft_is_state_remove(struct se_cmd *se_cmd)
-{
-	return 0;	/* XXX TBD */
-}
-
 /*
  * FC sequence response handler for follow-on sequences (data) and aborts.
  */
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index ff1c316..202755c 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -541,7 +541,6 @@ static struct target_core_fabric_ops ft_fabric_ops = {
 	.queue_tm_rsp =			ft_queue_tm_resp,
 	.get_fabric_sense_len =		ft_get_fabric_sense_len,
 	.set_fabric_sense_len =		ft_set_fabric_sense_len,
-	.is_state_remove =		ft_is_state_remove,
 	/*
 	 * Setup function pointers for generic logic in target_core_fabric_configfs.c
 	 */
diff --git a/drivers/target/tcm_vhost/tcm_vhost_configfs.c b/drivers/target/tcm_vhost/tcm_vhost_configfs.c
index aded90e..90126cb 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_configfs.c
+++ b/drivers/target/tcm_vhost/tcm_vhost_configfs.c
@@ -530,7 +530,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = {
 	.queue_tm_rsp			= tcm_vhost_queue_tm_rsp,
 	.get_fabric_sense_len		= tcm_vhost_get_fabric_sense_len,
 	.set_fabric_sense_len		= tcm_vhost_set_fabric_sense_len,
-	.is_state_remove		= tcm_vhost_is_state_remove,
 	/*
 	 * Setup function pointers for generic logic in target_core_fabric_configfs.c
 	 */
diff --git a/drivers/target/tcm_vhost/tcm_vhost_fabric.c b/drivers/target/tcm_vhost/tcm_vhost_fabric.c
index f9275cf..f7ab6a6 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_fabric.c
+++ b/drivers/target/tcm_vhost/tcm_vhost_fabric.c
@@ -345,8 +345,3 @@ u16 tcm_vhost_get_fabric_sense_len(void)
 {
 	return 0;
 }
-
-int tcm_vhost_is_state_remove(struct se_cmd *se_cmd)
-{
-	return 0;
-}
diff --git a/drivers/target/tcm_vhost/tcm_vhost_fabric.h b/drivers/target/tcm_vhost/tcm_vhost_fabric.h
index fddcd43..2ef85a1 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_fabric.h
+++ b/drivers/target/tcm_vhost/tcm_vhost_fabric.h
@@ -32,4 +32,3 @@ int tcm_vhost_queue_status(struct se_cmd *);
 int tcm_vhost_queue_tm_rsp(struct se_cmd *);
 u16 tcm_vhost_set_fabric_sense_len(struct se_cmd *, u32);
 u16 tcm_vhost_get_fabric_sense_len(void);
-int tcm_vhost_is_state_remove(struct se_cmd *);
diff --git a/drivers/target/usb-gadget/configfs.c b/drivers/target/usb-gadget/configfs.c
index 1f3349a2..8239791 100644
--- a/drivers/target/usb-gadget/configfs.c
+++ b/drivers/target/usb-gadget/configfs.c
@@ -452,7 +452,6 @@ static struct target_core_fabric_ops usbg_ops = {
 	.queue_tm_rsp			= usbg_queue_tm_rsp,
 	.get_fabric_sense_len		= usbg_get_fabric_sense_len,
 	.set_fabric_sense_len		= usbg_set_fabric_sense_len,
-	.is_state_remove		= usbg_is_state_remove,
 	.check_stop_free		= usbg_check_stop_free,
 
 	.fabric_make_wwn		= usbg_make_tport,
diff --git a/drivers/target/usb-gadget/fabric.c b/drivers/target/usb-gadget/fabric.c
index 8032436..e28d9db 100644
--- a/drivers/target/usb-gadget/fabric.c
+++ b/drivers/target/usb-gadget/fabric.c
@@ -620,8 +620,3 @@ u16 usbg_get_fabric_sense_len(void)
 {
 	return 0;
 }
-
-int usbg_is_state_remove(struct se_cmd *se_cmd)
-{
-	return 0;
-}
diff --git a/drivers/target/usb-gadget/usbg.h b/drivers/target/usb-gadget/usbg.h
index 353ba2b..9d6e0cc 100644
--- a/drivers/target/usb-gadget/usbg.h
+++ b/drivers/target/usb-gadget/usbg.h
@@ -202,6 +202,5 @@ int usbg_get_cmd_state(struct se_cmd *);
 int usbg_queue_tm_rsp(struct se_cmd *);
 u16 usbg_set_fabric_sense_len(struct se_cmd *, u32);
 u16 usbg_get_fabric_sense_len(void);
-int usbg_is_state_remove(struct se_cmd *);
 
 #endif
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 432bef4..0fc36c5 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -79,7 +79,6 @@ struct target_core_fabric_ops {
 	int (*queue_tm_rsp)(struct se_cmd *);
 	u16 (*set_fabric_sense_len)(struct se_cmd *, u32);
 	u16 (*get_fabric_sense_len)(void);
-	int (*is_state_remove)(struct se_cmd *);
 	/*
 	 * fabric module calls for target_core_fabric_configfs.c
 	 */
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux