Skip to content

Commit

Permalink
target: Remove unused target_core_fabric_ops.get_fabric_sense_len method
Browse files Browse the repository at this point in the history
There are no callers of se_tfo->get_fabric_sense_len(), so we should
stop having every fabric driver implement it.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Sep 17, 2012
1 parent 343d475 commit 2ed772b
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 65 deletions.
8 changes: 0 additions & 8 deletions Documentation/target/tcm_mod_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n"
buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n"
buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n"
buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n"
buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n"
buf += " /*\n"
Expand Down Expand Up @@ -906,13 +905,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
buf += "}\n\n"
bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n"

if re.search('get_fabric_sense_len\)\(', fo):
buf += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void)\n"
buf += "{\n"
buf += " return 0;\n"
buf += "}\n\n"
bufi += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void);\n"

if re.search('set_fabric_sense_len\)\(', fo):
buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n"
buf += "{\n"
Expand Down
6 changes: 0 additions & 6 deletions drivers/infiniband/ulp/srpt/ib_srpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -3569,11 +3569,6 @@ static u16 srpt_set_fabric_sense_len(struct se_cmd *cmd, u32 sense_length)
return 0;
}

static u16 srpt_get_fabric_sense_len(void)
{
return 0;
}

/**
* srpt_parse_i_port_id() - Parse an initiator port ID.
* @name: ASCII representation of a 128-bit initiator port ID.
Expand Down Expand Up @@ -3953,7 +3948,6 @@ static struct target_core_fabric_ops srpt_template = {
.queue_data_in = srpt_queue_response,
.queue_status = srpt_queue_status,
.queue_tm_rsp = srpt_queue_response,
.get_fabric_sense_len = srpt_get_fabric_sense_len,
.set_fabric_sense_len = srpt_set_fabric_sense_len,
/*
* Setup function pointers for generic logic in
Expand Down
7 changes: 0 additions & 7 deletions drivers/scsi/qla2xxx/tcm_qla2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,6 @@ static int tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
return 0;
}

static u16 tcm_qla2xxx_get_fabric_sense_len(void)
{
return 0;
}

static u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd,
u32 sense_length)
{
Expand Down Expand Up @@ -1691,7 +1686,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = {
.queue_data_in = tcm_qla2xxx_queue_data_in,
.queue_status = tcm_qla2xxx_queue_status,
.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,
/*
* Setup function pointers for generic logic in
Expand Down Expand Up @@ -1740,7 +1734,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
.queue_data_in = tcm_qla2xxx_queue_data_in,
.queue_status = tcm_qla2xxx_queue_status,
.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,
/*
* Setup function pointers for generic logic in
Expand Down
9 changes: 0 additions & 9 deletions drivers/target/iscsi/iscsi_target_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,14 +1557,6 @@ static u16 lio_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
return 2;
}

static u16 lio_get_fabric_sense_len(void)
{
/*
* Return two byte offset into allocated sense_buffer.
*/
return 2;
}

static int lio_queue_tm_rsp(struct se_cmd *se_cmd)
{
struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
Expand Down Expand Up @@ -1749,7 +1741,6 @@ int iscsi_target_register_configfs(void)
fabric->tf_ops.queue_status = &lio_queue_status;
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;
/*
* Setup function pointers for generic logic in target_core_fabric_configfs.c
*/
Expand Down
6 changes: 0 additions & 6 deletions drivers/target/loopback/tcm_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,11 +851,6 @@ static u16 tcm_loop_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length
return 0;
}

static u16 tcm_loop_get_fabric_sense_len(void)
{
return 0;
}

static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba)
{
switch (tl_hba->tl_proto_id) {
Expand Down Expand Up @@ -1374,7 +1369,6 @@ static int tcm_loop_register_configfs(void)
fabric->tf_ops.queue_status = &tcm_loop_queue_status;
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;

/*
* Setup function pointers for generic logic in target_core_fabric_configfs.c
Expand Down
6 changes: 0 additions & 6 deletions drivers/target/sbp/sbp_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,11 +1852,6 @@ static u16 sbp_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
return 0;
}

static u16 sbp_get_fabric_sense_len(void)
{
return 0;
}

static int sbp_check_stop_free(struct se_cmd *se_cmd)
{
struct sbp_target_request *req = container_of(se_cmd,
Expand Down Expand Up @@ -2534,7 +2529,6 @@ static struct target_core_fabric_ops sbp_ops = {
.queue_data_in = sbp_queue_data_in,
.queue_status = sbp_queue_status,
.queue_tm_rsp = sbp_queue_tm_rsp,
.get_fabric_sense_len = sbp_get_fabric_sense_len,
.set_fabric_sense_len = sbp_set_fabric_sense_len,
.check_stop_free = sbp_check_stop_free,

Expand Down
4 changes: 0 additions & 4 deletions drivers/target/target_core_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,6 @@ static int target_fabric_tf_ops_check(
pr_err("Missing tfo->set_fabric_sense_len()\n");
return -EINVAL;
}
if (!tfo->get_fabric_sense_len) {
pr_err("Missing tfo->get_fabric_sense_len()\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
Expand Down
6 changes: 0 additions & 6 deletions drivers/target/tcm_fc/tfc_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,11 +495,6 @@ static void ft_set_default_node_attr(struct se_node_acl *se_nacl)
{
}

static u16 ft_get_fabric_sense_len(void)
{
return 0;
}

static u16 ft_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_len)
{
return 0;
Expand Down Expand Up @@ -542,7 +537,6 @@ static struct target_core_fabric_ops ft_fabric_ops = {
.queue_data_in = ft_queue_data_in,
.queue_status = ft_queue_status,
.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,
/*
* Setup function pointers for generic logic in
Expand Down
6 changes: 0 additions & 6 deletions drivers/usb/gadget/tcm_usb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,11 +1480,6 @@ static u16 usbg_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
return 0;
}

static u16 usbg_get_fabric_sense_len(void)
{
return 0;
}

static const char *usbg_check_wwn(const char *name)
{
const char *n;
Expand Down Expand Up @@ -1910,7 +1905,6 @@ static struct target_core_fabric_ops usbg_ops = {
.queue_data_in = usbg_send_read_response,
.queue_status = usbg_send_status_response,
.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,
.check_stop_free = usbg_check_stop_free,

Expand Down
6 changes: 0 additions & 6 deletions drivers/vhost/tcm_vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,6 @@ static u16 tcm_vhost_set_fabric_sense_len(struct se_cmd *se_cmd,
return 0;
}

static u16 tcm_vhost_get_fabric_sense_len(void)
{
return 0;
}

static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd)
{
struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd;
Expand Down Expand Up @@ -1531,7 +1526,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = {
.queue_data_in = tcm_vhost_queue_data_in,
.queue_status = tcm_vhost_queue_status,
.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,
/*
* Setup callers for generic logic in target_core_fabric_configfs.c
Expand Down
1 change: 0 additions & 1 deletion include/target/target_core_fabric.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ struct target_core_fabric_ops {
int (*queue_status)(struct se_cmd *);
int (*queue_tm_rsp)(struct se_cmd *);
u16 (*set_fabric_sense_len)(struct se_cmd *, u32);
u16 (*get_fabric_sense_len)(void);
/*
* fabric module calls for target_core_fabric_configfs.c
*/
Expand Down

0 comments on commit 2ed772b

Please sign in to comment.