Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4aae5af authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger
Browse files

target: change core_tpg_register prototype



Remove the unneeded fabric_ptr argument, and change the type argument
to pass in a SPC protocol identifier.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 3868e436
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -238,8 +238,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
	buf += "	tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n"
	buf += "	tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n"
	buf += "	ret = core_tpg_register(&" + fabric_mod_name + "_ops, wwn,\n"
	buf += "				&tpg->se_tpg, tpg,\n"
	buf += "				TRANSPORT_TPG_TYPE_NORMAL);\n"
	buf += "				&tpg->se_tpg, SCSI_PROTOCOL_SAS);\n"
	buf += "	if (ret < 0) {\n"
	buf += "		kfree(tpg);\n"
	buf += "		return NULL;\n"
+1 −1
Original line number Diff line number Diff line
@@ -3791,7 +3791,7 @@ static struct se_portal_group *srpt_make_tpg(struct se_wwn *wwn,

	/* Initialize sport->port_wwn and sport->port_tpg_1 */
	res = core_tpg_register(&srpt_template, &sport->port_wwn,
			&sport->port_tpg_1, sport, TRANSPORT_TPG_TYPE_NORMAL);
			&sport->port_tpg_1, SCSI_PROTOCOL_SRP);
	if (res)
		return ERR_PTR(res);

+4 −4
Original line number Diff line number Diff line
@@ -1113,8 +1113,8 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg(
	tpg->tpg_attrib.cache_dynamic_acls = 1;
	tpg->tpg_attrib.demo_mode_login_only = 1;

	ret = core_tpg_register(&tcm_qla2xxx_ops, wwn,
				&tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
	ret = core_tpg_register(&tcm_qla2xxx_ops, wwn, &tpg->se_tpg,
				SCSI_PROTOCOL_FCP);
	if (ret < 0) {
		kfree(tpg);
		return NULL;
@@ -1233,8 +1233,8 @@ static struct se_portal_group *tcm_qla2xxx_npiv_make_tpg(
	tpg->tpg_attrib.cache_dynamic_acls = 1;
	tpg->tpg_attrib.demo_mode_login_only = 1;

	ret = core_tpg_register(&tcm_qla2xxx_npiv_ops, wwn,
				&tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL);
	ret = core_tpg_register(&tcm_qla2xxx_npiv_ops, wwn, &tpg->se_tpg,
				SCSI_PROTOCOL_FCP);
	if (ret < 0) {
		kfree(tpg);
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -1421,7 +1421,7 @@ static struct se_portal_group *lio_target_tiqn_addtpg(
		return NULL;

	ret = core_tpg_register(&iscsi_ops, wwn, &tpg->tpg_se_tpg,
				tpg, TRANSPORT_TPG_TYPE_NORMAL);
				SCSI_PROTOCOL_ISCSI);
	if (ret < 0)
		return NULL;

+1 −2
Original line number Diff line number Diff line
@@ -68,8 +68,7 @@ int iscsit_load_discovery_tpg(void)
		return -1;
	}

	ret = core_tpg_register(&iscsi_ops, NULL, &tpg->tpg_se_tpg,
				tpg, TRANSPORT_TPG_TYPE_DISCOVERY);
	ret = core_tpg_register(&iscsi_ops, NULL, &tpg->tpg_se_tpg, -1);
	if (ret < 0) {
		kfree(tpg);
		return -1;
Loading