Skip to content

Commit 6f3bf5a

Browse files
KAGA-KOKOmartinkpetersen
authored andcommitted
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: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Mike Christie <mchristi@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 265d59a commit 6f3bf5a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

drivers/target/target_core_configfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ static struct config_group *target_core_register_fabric(
263263
&tf->tf_discovery_cit);
264264
configfs_add_default_group(&tf->tf_disc_group, &tf->tf_group);
265265

266-
pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric:"
267-
" %s\n", tf->tf_group.cg_item.ci_name);
266+
pr_debug("Target_Core_ConfigFS: REGISTER -> Allocated Fabric: %s\n",
267+
config_item_name(&tf->tf_group.cg_item));
268268
return &tf->tf_group;
269269
}
270270

drivers/target/target_core_sbc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -978,9 +978,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
978978
}
979979
case COMPARE_AND_WRITE:
980980
if (!dev->dev_attrib.emulate_caw) {
981-
pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject"
982-
" COMPARE_AND_WRITE\n", dev->se_hba->backend->ops->name,
983-
dev->dev_group.cg_item.ci_name, dev->t10_wwn.unit_serial);
981+
pr_err_ratelimited("se_device %s/%s (vpd_unit_serial %s) reject COMPARE_AND_WRITE\n",
982+
dev->se_hba->backend->ops->name,
983+
config_item_name(&dev->dev_group.cg_item),
984+
dev->t10_wwn.unit_serial);
984985
return TCM_UNSUPPORTED_SCSI_OPCODE;
985986
}
986987
sectors = cdb[13];

0 commit comments

Comments
 (0)