Commit 6f3bf5a2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: target: Use config_item_name() instead of open-coding it

Some target code uses config_item_name() while other code accesses .ci_name
directly. Make the target code consistent by switching to
config_item_name().
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 265d59aa
...@@ -263,8 +263,8 @@ static struct config_group *target_core_register_fabric( ...@@ -263,8 +263,8 @@ static struct config_group *target_core_register_fabric(
&tf->tf_discovery_cit); &tf->tf_discovery_cit);
configfs_add_default_group(&tf->tf_disc_group, &tf->tf_group); configfs_add_default_group(&tf->tf_disc_group, &tf->tf_group);
pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric:" pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric: %s\n",
" %s\n", tf->tf_group.cg_item.ci_name); config_item_name(&tf->tf_group.cg_item));
return &tf->tf_group; return &tf->tf_group;
} }
......
...@@ -978,9 +978,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -978,9 +978,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
} }
case COMPARE_AND_WRITE: case COMPARE_AND_WRITE:
if (!dev->dev_attrib.emulate_caw) { if (!dev->dev_attrib.emulate_caw) {
pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject" pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject COMPARE_AND_WRITE\n",
" COMPARE_AND_WRITE\n", dev->se_hba->backend->ops->name, dev->se_hba->backend->ops->name,
dev->dev_group.cg_item.ci_name, dev->t10_wwn.unit_serial); config_item_name(&dev->dev_group.cg_item),
dev->t10_wwn.unit_serial);
return TCM_UNSUPPORTED_SCSI_OPCODE; return TCM_UNSUPPORTED_SCSI_OPCODE;
} }
sectors = cdb[13]; sectors = cdb[13];
......
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