scsi: infiniband: srpt: Remove default fabric ops callouts
authorDmitry Bogdanov <d.bogdanov@yadro.com>
Mon, 13 Mar 2023 18:11:00 +0000 (21:11 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 17 Mar 2023 03:36:36 +0000 (23:36 -0400)
Remove callouts that are identical to the default implementations in TCM
Core.

Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Link: https://lore.kernel.org/r/20230313181110.20566-3-d.bogdanov@yadro.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/infiniband/ulp/srpt/ib_srpt.c

index 3c3fae738c3edf80a6f47181ce1baf3a6f542b26..3e9343fd2d8e437b3b45bab3a247e70a6a9a8796 100644 (file)
@@ -3300,11 +3300,6 @@ static int srpt_check_true(struct se_portal_group *se_tpg)
        return 1;
 }
 
-static int srpt_check_false(struct se_portal_group *se_tpg)
-{
-       return 0;
-}
-
 static struct srpt_port *srpt_tpg_to_sport(struct se_portal_group *tpg)
 {
        return tpg->se_tpg_wwn->priv;
@@ -3334,11 +3329,6 @@ static u16 srpt_get_tag(struct se_portal_group *tpg)
        return 1;
 }
 
-static u32 srpt_tpg_get_inst_index(struct se_portal_group *se_tpg)
-{
-       return 1;
-}
-
 static void srpt_release_cmd(struct se_cmd *se_cmd)
 {
        struct srpt_send_ioctx *ioctx = container_of(se_cmd,
@@ -3378,24 +3368,6 @@ static void srpt_close_session(struct se_session *se_sess)
        srpt_disconnect_ch_sync(ch);
 }
 
-/**
- * srpt_sess_get_index - return the value of scsiAttIntrPortIndex (SCSI-MIB)
- * @se_sess: SCSI target session.
- *
- * A quote from RFC 4455 (SCSI-MIB) about this MIB object:
- * This object represents an arbitrary integer used to uniquely identify a
- * particular attached remote initiator port to a particular SCSI target port
- * within a particular SCSI target device within a particular SCSI instance.
- */
-static u32 srpt_sess_get_index(struct se_session *se_sess)
-{
-       return 0;
-}
-
-static void srpt_set_default_node_attrs(struct se_node_acl *nacl)
-{
-}
-
 /* Note: only used from inside debug printk's by the TCM core. */
 static int srpt_get_tcm_cmd_state(struct se_cmd *se_cmd)
 {
@@ -3866,18 +3838,13 @@ static const struct target_core_fabric_ops srpt_template = {
        .fabric_name                    = "srpt",
        .tpg_get_wwn                    = srpt_get_fabric_wwn,
        .tpg_get_tag                    = srpt_get_tag,
-       .tpg_check_demo_mode            = srpt_check_false,
        .tpg_check_demo_mode_cache      = srpt_check_true,
        .tpg_check_demo_mode_write_protect = srpt_check_true,
-       .tpg_check_prod_mode_write_protect = srpt_check_false,
-       .tpg_get_inst_index             = srpt_tpg_get_inst_index,
        .release_cmd                    = srpt_release_cmd,
        .check_stop_free                = srpt_check_stop_free,
        .close_session                  = srpt_close_session,
-       .sess_get_index                 = srpt_sess_get_index,
        .sess_get_initiator_sid         = NULL,
        .write_pending                  = srpt_write_pending,
-       .set_default_node_attributes    = srpt_set_default_node_attrs,
        .get_cmd_state                  = srpt_get_tcm_cmd_state,
        .queue_data_in                  = srpt_queue_data_in,
        .queue_status                   = srpt_queue_status,