mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
6baca7601b
commit
30c7ca9350
22 changed files with 109 additions and 165 deletions
|
|
@ -285,11 +285,6 @@ static int vhost_scsi_check_false(struct se_portal_group *se_tpg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *vhost_scsi_get_fabric_name(void)
|
||||
{
|
||||
return "vhost";
|
||||
}
|
||||
|
||||
static char *vhost_scsi_get_fabric_wwn(struct se_portal_group *se_tpg)
|
||||
{
|
||||
struct vhost_scsi_tpg *tpg = container_of(se_tpg,
|
||||
|
|
@ -2290,7 +2285,7 @@ static struct configfs_attribute *vhost_scsi_wwn_attrs[] = {
|
|||
static const struct target_core_fabric_ops vhost_scsi_ops = {
|
||||
.module = THIS_MODULE,
|
||||
.name = "vhost",
|
||||
.get_fabric_name = vhost_scsi_get_fabric_name,
|
||||
.fabric_name = "vhost",
|
||||
.tpg_get_wwn = vhost_scsi_get_fabric_wwn,
|
||||
.tpg_get_tag = vhost_scsi_get_tpgt,
|
||||
.tpg_check_demo_mode = vhost_scsi_check_true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue