aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_stat.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2018-11-23 18:36:12 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-28 18:50:58 -0500
commit30c7ca9350048486ab32fdb9f5f6ed0603bba39a (patch)
tree5fdac4a507e94a69287d57900faa095b253d2661 /drivers/target/target_core_stat.c
parentscsi: target: drop unused pi_prot_format attribute storage (diff)
downloadlinux-dev-30c7ca9350048486ab32fdb9f5f6ed0603bba39a.tar.xz
linux-dev-30c7ca9350048486ab32fdb9f5f6ed0603bba39a.zip
scsi: target: drop unnecessary get_fabric_name() accessor from fabric_ops
All fabrics return a const string. In all cases *except* iSCSI the get_fabric_name() string matches fabric_ops.name. Both fabric_ops.get_fabric_name() and fabric_ops.name are user-facing, with the former being used for PR/ALUA state and the latter for ConfigFS (config/target/$name), so we unfortunately need to keep both strings around for now. Replace the useless .get_fabric_name() accessor function with a const string fabric_name member variable. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_stat.c')
-rw-r--r--drivers/target/target_core_stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c
index f0db91ebd735..b80b3e990821 100644
--- a/drivers/target/target_core_stat.c
+++ b/drivers/target/target_core_stat.c
@@ -612,7 +612,7 @@ static ssize_t target_stat_tgt_port_name_show(struct config_item *item,
dev = rcu_dereference(lun->lun_se_dev);
if (dev)
ret = snprintf(page, PAGE_SIZE, "%sPort#%u\n",
- tpg->se_tpg_tfo->get_fabric_name(),
+ tpg->se_tpg_tfo->fabric_name,
lun->lun_rtpi);
rcu_read_unlock();
return ret;
@@ -767,7 +767,7 @@ static ssize_t target_stat_transport_device_show(struct config_item *item,
if (dev) {
/* scsiTransportType */
ret = snprintf(page, PAGE_SIZE, "scsiTransport%s\n",
- tpg->se_tpg_tfo->get_fabric_name());
+ tpg->se_tpg_tfo->fabric_name);
}
rcu_read_unlock();
return ret;