[Open-FCoE] [PATCH 2/4] Remove fc_get_host_port_type() from fc_attr.c

Steve Ma steve.ma at intel.com
Tue Sep 23 00:40:48 UTC 2008


The port type is set to a constant FC_PORTTYPE_NPORT.
Therefore it may be set in the fc_lport_init() routine.
The fc_get_host_port_type() routine may be removed from
fc_attr.c.

Signed-off-by: Steve Ma <steve.ma at intel.com>
---

 drivers/scsi/fcoe/fcoeinit.c  |    1 -
 drivers/scsi/libfc/fc_attr.c  |    6 ------
 drivers/scsi/libfc/fc_lport.c |    1 +
 include/scsi/libfc/libfc.h    |    1 -
 4 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoeinit.c b/drivers/scsi/fcoe/fcoeinit.c
index 7e81661..80630fa 100644
--- a/drivers/scsi/fcoe/fcoeinit.c
+++ b/drivers/scsi/fcoe/fcoeinit.c
@@ -70,7 +70,6 @@ struct fc_function_template fcoe_transport_function = {
 	.show_host_supported_speeds = 1,
 	.get_host_speed = fc_get_host_speed,
 	.show_host_speed = 1,
-	.get_host_port_type = fc_get_host_port_type,
 	.show_host_port_type = 1,
 	.get_host_port_state = fc_get_host_port_state,
 	.show_host_port_state = 1,
diff --git a/drivers/scsi/libfc/fc_attr.c b/drivers/scsi/libfc/fc_attr.c
index bdc06e1..18520b7 100644
--- a/drivers/scsi/libfc/fc_attr.c
+++ b/drivers/scsi/libfc/fc_attr.c
@@ -28,12 +28,6 @@ MODULE_AUTHOR("Open-FCoE.org");
 MODULE_DESCRIPTION("libfc");
 MODULE_LICENSE("GPL");
 
-void fc_get_host_port_type(struct Scsi_Host *shost)
-{
-	fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
-}
-EXPORT_SYMBOL(fc_get_host_port_type);
-
 void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout)
 {
 	if (timeout)
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index f666ceb..40c9597 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -933,6 +933,7 @@ int fc_lport_init(struct fc_lport *lp)
 	if (!lp->tt.lport_logout)
 		lp->tt.lport_logout = fc_lport_logout;
 
+	fc_host_port_type(lp->host) = FC_PORTTYPE_NPORT;
 	fc_host_node_name(lp->host) = lp->wwnn;
 	fc_host_port_name(lp->host) = lp->wwpn;
 	fc_host_supported_classes(lp->host) = FC_COS_CLASS3;
diff --git a/include/scsi/libfc/libfc.h b/include/scsi/libfc/libfc.h
index 6c19a02..19faf49 100644
--- a/include/scsi/libfc/libfc.h
+++ b/include/scsi/libfc/libfc.h
@@ -749,7 +749,6 @@ void fc_seq_set_rec_data(struct fc_seq *sp, u32 rec_data);
  * Functions for fc_functions_template
  */
 void fc_get_host_speed(struct Scsi_Host *shost);
-void fc_get_host_port_type(struct Scsi_Host *shost);
 void fc_get_host_port_state(struct Scsi_Host *shost);
 void fc_set_rport_loss_tmo(struct fc_rport *rport, u32 timeout);
 struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *);




More information about the devel mailing list