aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-08-15 17:35:24 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-09-17 19:15:47 -0400
commit2ed772b7b9df0f459308b3cbececc0136076d09e (patch)
tree4f97f1cbdb889b921d48799c085e5142e5aa001b
parent343d475d6176fa081918fcbf3fcb0b0143e28661 (diff)
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: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py8
-rw-r--r--drivers/infiniband/ulp/srpt/ib_srpt.c6
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c7
-rw-r--r--drivers/target/iscsi/iscsi_target_configfs.c9
-rw-r--r--drivers/target/loopback/tcm_loop.c6
-rw-r--r--drivers/target/sbp/sbp_target.c6
-rw-r--r--drivers/target/target_core_configfs.c4
-rw-r--r--drivers/target/tcm_fc/tfc_conf.c6
-rw-r--r--drivers/usb/gadget/tcm_usb_gadget.c6
-rw-r--r--drivers/vhost/tcm_vhost.c6
-rw-r--r--include/target/target_core_fabric.h1
11 files changed, 0 insertions, 65 deletions
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index a78879b01f09..13652381cb71 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -402,7 +402,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
402 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" 402 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
403 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" 403 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n"
404 buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" 404 buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n"
405 buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n"
406 buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n" 405 buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n"
407 buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" 406 buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n"
408 buf += " /*\n" 407 buf += " /*\n"
@@ -906,13 +905,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
906 buf += "}\n\n" 905 buf += "}\n\n"
907 bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n" 906 bufi += "int " + fabric_mod_name + "_queue_tm_rsp(struct se_cmd *);\n"
908 907
909 if re.search('get_fabric_sense_len\)\(', fo):
910 buf += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void)\n"
911 buf += "{\n"
912 buf += " return 0;\n"
913 buf += "}\n\n"
914 bufi += "u16 " + fabric_mod_name + "_get_fabric_sense_len(void);\n"
915
916 if re.search('set_fabric_sense_len\)\(', fo): 908 if re.search('set_fabric_sense_len\)\(', fo):
917 buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n" 909 buf += "u16 " + fabric_mod_name + "_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)\n"
918 buf += "{\n" 910 buf += "{\n"
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 9e1449f8c6a2..9e949750be3a 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3569,11 +3569,6 @@ static u16 srpt_set_fabric_sense_len(struct se_cmd *cmd, u32 sense_length)
3569 return 0; 3569 return 0;
3570} 3570}
3571 3571
3572static u16 srpt_get_fabric_sense_len(void)
3573{
3574 return 0;
3575}
3576
3577/** 3572/**
3578 * srpt_parse_i_port_id() - Parse an initiator port ID. 3573 * srpt_parse_i_port_id() - Parse an initiator port ID.
3579 * @name: ASCII representation of a 128-bit initiator port ID. 3574 * @name: ASCII representation of a 128-bit initiator port ID.
@@ -3953,7 +3948,6 @@ static struct target_core_fabric_ops srpt_template = {
3953 .queue_data_in = srpt_queue_response, 3948 .queue_data_in = srpt_queue_response,
3954 .queue_status = srpt_queue_status, 3949 .queue_status = srpt_queue_status,
3955 .queue_tm_rsp = srpt_queue_response, 3950 .queue_tm_rsp = srpt_queue_response,
3956 .get_fabric_sense_len = srpt_get_fabric_sense_len,
3957 .set_fabric_sense_len = srpt_set_fabric_sense_len, 3951 .set_fabric_sense_len = srpt_set_fabric_sense_len,
3958 /* 3952 /*
3959 * Setup function pointers for generic logic in 3953 * Setup function pointers for generic logic in
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 4752f65a9272..556afd5da9ff 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -735,11 +735,6 @@ static int tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
735 return 0; 735 return 0;
736} 736}
737 737
738static u16 tcm_qla2xxx_get_fabric_sense_len(void)
739{
740 return 0;
741}
742
743static u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd, 738static u16 tcm_qla2xxx_set_fabric_sense_len(struct se_cmd *se_cmd,
744 u32 sense_length) 739 u32 sense_length)
745{ 740{
@@ -1691,7 +1686,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_ops = {
1691 .queue_data_in = tcm_qla2xxx_queue_data_in, 1686 .queue_data_in = tcm_qla2xxx_queue_data_in,
1692 .queue_status = tcm_qla2xxx_queue_status, 1687 .queue_status = tcm_qla2xxx_queue_status,
1693 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, 1688 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp,
1694 .get_fabric_sense_len = tcm_qla2xxx_get_fabric_sense_len,
1695 .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, 1689 .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len,
1696 /* 1690 /*
1697 * Setup function pointers for generic logic in 1691 * Setup function pointers for generic logic in
@@ -1740,7 +1734,6 @@ static struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
1740 .queue_data_in = tcm_qla2xxx_queue_data_in, 1734 .queue_data_in = tcm_qla2xxx_queue_data_in,
1741 .queue_status = tcm_qla2xxx_queue_status, 1735 .queue_status = tcm_qla2xxx_queue_status,
1742 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp, 1736 .queue_tm_rsp = tcm_qla2xxx_queue_tm_rsp,
1743 .get_fabric_sense_len = tcm_qla2xxx_get_fabric_sense_len,
1744 .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len, 1737 .set_fabric_sense_len = tcm_qla2xxx_set_fabric_sense_len,
1745 /* 1738 /*
1746 * Setup function pointers for generic logic in 1739 * Setup function pointers for generic logic in
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index a7b25e783b58..518fd4e86409 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -1557,14 +1557,6 @@ static u16 lio_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
1557 return 2; 1557 return 2;
1558} 1558}
1559 1559
1560static u16 lio_get_fabric_sense_len(void)
1561{
1562 /*
1563 * Return two byte offset into allocated sense_buffer.
1564 */
1565 return 2;
1566}
1567
1568static int lio_queue_tm_rsp(struct se_cmd *se_cmd) 1560static int lio_queue_tm_rsp(struct se_cmd *se_cmd)
1569{ 1561{
1570 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd); 1562 struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
@@ -1749,7 +1741,6 @@ int iscsi_target_register_configfs(void)
1749 fabric->tf_ops.queue_status = &lio_queue_status; 1741 fabric->tf_ops.queue_status = &lio_queue_status;
1750 fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp; 1742 fabric->tf_ops.queue_tm_rsp = &lio_queue_tm_rsp;
1751 fabric->tf_ops.set_fabric_sense_len = &lio_set_fabric_sense_len; 1743 fabric->tf_ops.set_fabric_sense_len = &lio_set_fabric_sense_len;
1752 fabric->tf_ops.get_fabric_sense_len = &lio_get_fabric_sense_len;
1753 /* 1744 /*
1754 * Setup function pointers for generic logic in target_core_fabric_configfs.c 1745 * Setup function pointers for generic logic in target_core_fabric_configfs.c
1755 */ 1746 */
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 5491c632a15e..4ab1d0b43a85 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -851,11 +851,6 @@ static u16 tcm_loop_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length
851 return 0; 851 return 0;
852} 852}
853 853
854static u16 tcm_loop_get_fabric_sense_len(void)
855{
856 return 0;
857}
858
859static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) 854static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba)
860{ 855{
861 switch (tl_hba->tl_proto_id) { 856 switch (tl_hba->tl_proto_id) {
@@ -1374,7 +1369,6 @@ static int tcm_loop_register_configfs(void)
1374 fabric->tf_ops.queue_status = &tcm_loop_queue_status; 1369 fabric->tf_ops.queue_status = &tcm_loop_queue_status;
1375 fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; 1370 fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp;
1376 fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len; 1371 fabric->tf_ops.set_fabric_sense_len = &tcm_loop_set_fabric_sense_len;
1377 fabric->tf_ops.get_fabric_sense_len = &tcm_loop_get_fabric_sense_len;
1378 1372
1379 /* 1373 /*
1380 * Setup function pointers for generic logic in target_core_fabric_configfs.c 1374 * Setup function pointers for generic logic in target_core_fabric_configfs.c
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 713b88203799..cb40a40326cd 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
@@ -1852,11 +1852,6 @@ static u16 sbp_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
1852 return 0; 1852 return 0;
1853} 1853}
1854 1854
1855static u16 sbp_get_fabric_sense_len(void)
1856{
1857 return 0;
1858}
1859
1860static int sbp_check_stop_free(struct se_cmd *se_cmd) 1855static int sbp_check_stop_free(struct se_cmd *se_cmd)
1861{ 1856{
1862 struct sbp_target_request *req = container_of(se_cmd, 1857 struct sbp_target_request *req = container_of(se_cmd,
@@ -2534,7 +2529,6 @@ static struct target_core_fabric_ops sbp_ops = {
2534 .queue_data_in = sbp_queue_data_in, 2529 .queue_data_in = sbp_queue_data_in,
2535 .queue_status = sbp_queue_status, 2530 .queue_status = sbp_queue_status,
2536 .queue_tm_rsp = sbp_queue_tm_rsp, 2531 .queue_tm_rsp = sbp_queue_tm_rsp,
2537 .get_fabric_sense_len = sbp_get_fabric_sense_len,
2538 .set_fabric_sense_len = sbp_set_fabric_sense_len, 2532 .set_fabric_sense_len = sbp_set_fabric_sense_len,
2539 .check_stop_free = sbp_check_stop_free, 2533 .check_stop_free = sbp_check_stop_free,
2540 2534
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 801efa892046..946d8e952b67 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -461,10 +461,6 @@ static int target_fabric_tf_ops_check(
461 pr_err("Missing tfo->set_fabric_sense_len()\n"); 461 pr_err("Missing tfo->set_fabric_sense_len()\n");
462 return -EINVAL; 462 return -EINVAL;
463 } 463 }
464 if (!tfo->get_fabric_sense_len) {
465 pr_err("Missing tfo->get_fabric_sense_len()\n");
466 return -EINVAL;
467 }
468 /* 464 /*
469 * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn() 465 * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn()
470 * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in 466 * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index 9501844fae2d..4f97701350a8 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -495,11 +495,6 @@ static void ft_set_default_node_attr(struct se_node_acl *se_nacl)
495{ 495{
496} 496}
497 497
498static u16 ft_get_fabric_sense_len(void)
499{
500 return 0;
501}
502
503static u16 ft_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_len) 498static u16 ft_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_len)
504{ 499{
505 return 0; 500 return 0;
@@ -542,7 +537,6 @@ static struct target_core_fabric_ops ft_fabric_ops = {
542 .queue_data_in = ft_queue_data_in, 537 .queue_data_in = ft_queue_data_in,
543 .queue_status = ft_queue_status, 538 .queue_status = ft_queue_status,
544 .queue_tm_rsp = ft_queue_tm_resp, 539 .queue_tm_rsp = ft_queue_tm_resp,
545 .get_fabric_sense_len = ft_get_fabric_sense_len,
546 .set_fabric_sense_len = ft_set_fabric_sense_len, 540 .set_fabric_sense_len = ft_set_fabric_sense_len,
547 /* 541 /*
548 * Setup function pointers for generic logic in 542 * Setup function pointers for generic logic in
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c
index 5444866e13ef..b7ac43b08851 100644
--- a/drivers/usb/gadget/tcm_usb_gadget.c
+++ b/drivers/usb/gadget/tcm_usb_gadget.c
@@ -1480,11 +1480,6 @@ static u16 usbg_set_fabric_sense_len(struct se_cmd *se_cmd, u32 sense_length)
1480 return 0; 1480 return 0;
1481} 1481}
1482 1482
1483static u16 usbg_get_fabric_sense_len(void)
1484{
1485 return 0;
1486}
1487
1488static const char *usbg_check_wwn(const char *name) 1483static const char *usbg_check_wwn(const char *name)
1489{ 1484{
1490 const char *n; 1485 const char *n;
@@ -1910,7 +1905,6 @@ static struct target_core_fabric_ops usbg_ops = {
1910 .queue_data_in = usbg_send_read_response, 1905 .queue_data_in = usbg_send_read_response,
1911 .queue_status = usbg_send_status_response, 1906 .queue_status = usbg_send_status_response,
1912 .queue_tm_rsp = usbg_queue_tm_rsp, 1907 .queue_tm_rsp = usbg_queue_tm_rsp,
1913 .get_fabric_sense_len = usbg_get_fabric_sense_len,
1914 .set_fabric_sense_len = usbg_set_fabric_sense_len, 1908 .set_fabric_sense_len = usbg_set_fabric_sense_len,
1915 .check_stop_free = usbg_check_stop_free, 1909 .check_stop_free = usbg_check_stop_free,
1916 1910
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index ed8e2e6c8df2..94e6e04aecf2 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -336,11 +336,6 @@ static u16 tcm_vhost_set_fabric_sense_len(struct se_cmd *se_cmd,
336 return 0; 336 return 0;
337} 337}
338 338
339static u16 tcm_vhost_get_fabric_sense_len(void)
340{
341 return 0;
342}
343
344static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd) 339static void vhost_scsi_free_cmd(struct tcm_vhost_cmd *tv_cmd)
345{ 340{
346 struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; 341 struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd;
@@ -1531,7 +1526,6 @@ static struct target_core_fabric_ops tcm_vhost_ops = {
1531 .queue_data_in = tcm_vhost_queue_data_in, 1526 .queue_data_in = tcm_vhost_queue_data_in,
1532 .queue_status = tcm_vhost_queue_status, 1527 .queue_status = tcm_vhost_queue_status,
1533 .queue_tm_rsp = tcm_vhost_queue_tm_rsp, 1528 .queue_tm_rsp = tcm_vhost_queue_tm_rsp,
1534 .get_fabric_sense_len = tcm_vhost_get_fabric_sense_len,
1535 .set_fabric_sense_len = tcm_vhost_set_fabric_sense_len, 1529 .set_fabric_sense_len = tcm_vhost_set_fabric_sense_len,
1536 /* 1530 /*
1537 * Setup callers for generic logic in target_core_fabric_configfs.c 1531 * Setup callers for generic logic in target_core_fabric_configfs.c
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 69fb3cfd02d7..a218d02f8295 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -63,7 +63,6 @@ struct target_core_fabric_ops {
63 int (*queue_status)(struct se_cmd *); 63 int (*queue_status)(struct se_cmd *);
64 int (*queue_tm_rsp)(struct se_cmd *); 64 int (*queue_tm_rsp)(struct se_cmd *);
65 u16 (*set_fabric_sense_len)(struct se_cmd *, u32); 65 u16 (*set_fabric_sense_len)(struct se_cmd *, u32);
66 u16 (*get_fabric_sense_len)(void);
67 /* 66 /*
68 * fabric module calls for target_core_fabric_configfs.c 67 * fabric module calls for target_core_fabric_configfs.c
69 */ 68 */