Commit 2ed772b7 authored by Roland Dreier's avatar Roland Dreier Committed by Nicholas Bellinger

target: Remove unused target_core_fabric_ops.get_fabric_sense_len method

There are no callers of se_tfo->get_fabric_sense_len(), so we should
stop having every fabric driver implement it.
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 343d475d
......@@ -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"
......@@ -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"
......
......@@ -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.
......@@ -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
......
......@@ -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)
{
......@@ -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
......@@ -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
......
......@@ -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);
......@@ -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
*/
......
......@@ -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) {
......@@ -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
......
......@@ -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,
......@@ -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,
......
......@@ -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
......
......@@ -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;
......@@ -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
......
......@@ -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;
......@@ -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,
......
......@@ -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;
......@@ -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
......
......@@ -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
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment