aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2014-04-04 19:54:14 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-04-11 18:30:51 -0400
commit0d7cb932b7ccde61654f5f01754d335872dd15ab (patch)
tree012f3d398d84193507834537dffd0d5cc82f3e27 /drivers/target
parent705665da222b810fced1273169d63f31635df6f0 (diff)
target/tcm_fc: Rename ft_{add,del}_lport to {add,del}_wwn
These functions are not adding or deleting an lport. They are adding a wwn that may match with an lport that is present on the system. Renaming ft_del_lport also means we won't have functions named both ft_del_lport and ft_lport_del any more. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/tcm_fc/tfc_conf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
index bd7d544d5478..efdcb9663a1a 100644
--- a/drivers/target/tcm_fc/tfc_conf.c
+++ b/drivers/target/tcm_fc/tfc_conf.c
@@ -403,7 +403,7 @@ struct ft_tpg *ft_lport_find_tpg(struct fc_lport *lport)
403 * Add lport to allowed config. 403 * Add lport to allowed config.
404 * The name is the WWPN in lower-case ASCII, colon-separated bytes. 404 * The name is the WWPN in lower-case ASCII, colon-separated bytes.
405 */ 405 */
406static struct se_wwn *ft_add_lport( 406static struct se_wwn *ft_add_wwn(
407 struct target_fabric_configfs *tf, 407 struct target_fabric_configfs *tf,
408 struct config_group *group, 408 struct config_group *group,
409 const char *name) 409 const char *name)
@@ -412,7 +412,7 @@ static struct se_wwn *ft_add_lport(
412 struct ft_lport_wwn *old_ft_wwn; 412 struct ft_lport_wwn *old_ft_wwn;
413 u64 wwpn; 413 u64 wwpn;
414 414
415 pr_debug("add lport %s\n", name); 415 pr_debug("add wwn %s\n", name);
416 if (ft_parse_wwn(name, &wwpn, 1) < 0) 416 if (ft_parse_wwn(name, &wwpn, 1) < 0)
417 return NULL; 417 return NULL;
418 ft_wwn = kzalloc(sizeof(*ft_wwn), GFP_KERNEL); 418 ft_wwn = kzalloc(sizeof(*ft_wwn), GFP_KERNEL);
@@ -435,12 +435,12 @@ static struct se_wwn *ft_add_lport(
435 return &ft_wwn->se_wwn; 435 return &ft_wwn->se_wwn;
436} 436}
437 437
438static void ft_del_lport(struct se_wwn *wwn) 438static void ft_del_wwn(struct se_wwn *wwn)
439{ 439{
440 struct ft_lport_wwn *ft_wwn = container_of(wwn, 440 struct ft_lport_wwn *ft_wwn = container_of(wwn,
441 struct ft_lport_wwn, se_wwn); 441 struct ft_lport_wwn, se_wwn);
442 442
443 pr_debug("del lport %s\n", ft_wwn->name); 443 pr_debug("del wwn %s\n", ft_wwn->name);
444 mutex_lock(&ft_lport_lock); 444 mutex_lock(&ft_lport_lock);
445 list_del(&ft_wwn->ft_wwn_node); 445 list_del(&ft_wwn->ft_wwn_node);
446 mutex_unlock(&ft_lport_lock); 446 mutex_unlock(&ft_lport_lock);
@@ -542,8 +542,8 @@ static struct target_core_fabric_ops ft_fabric_ops = {
542 * Setup function pointers for generic logic in 542 * Setup function pointers for generic logic in
543 * target_core_fabric_configfs.c 543 * target_core_fabric_configfs.c
544 */ 544 */
545 .fabric_make_wwn = &ft_add_lport, 545 .fabric_make_wwn = &ft_add_wwn,
546 .fabric_drop_wwn = &ft_del_lport, 546 .fabric_drop_wwn = &ft_del_wwn,
547 .fabric_make_tpg = &ft_add_tpg, 547 .fabric_make_tpg = &ft_add_tpg,
548 .fabric_drop_tpg = &ft_del_tpg, 548 .fabric_drop_tpg = &ft_del_tpg,
549 .fabric_post_link = NULL, 549 .fabric_post_link = NULL,