[Open-FCoE] [RFC PATCH 26/28] libfc: merge fc_lport_flogi_send into fc_lport_enter_flogi

Robert Love robert.w.love at intel.com
Thu Sep 11 23:37:27 UTC 2008


These are two small functions flogi_send is only ever called
by enter_flogi, so let's just combine them.

Signed-off-by: Robert Love <robert.w.love at intel.com>
---

 drivers/scsi/libfc/fc_lport.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 4856f5b..9a1964e 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1089,11 +1089,16 @@ static void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, void *lp
 /*
  * Send ELS (extended link service) FLOGI request to peer.
  */
-static void fc_lport_flogi_send(struct fc_lport *lport)
+void fc_lport_enter_flogi(struct fc_lport *lport)
 {
 	struct fc_frame *fp;
 	struct fc_els_flogi *flp;
 
+	if (fc_lport_debug)
+		FC_DBG("Processing FLOGI state\n");
+
+	fc_lport_state_enter(lport, LPORT_ST_FLOGI);
+
 	fp = fc_frame_alloc(lport, sizeof(*flp));
 	if (!fp)
 		return fc_lport_error(lport, fp);
@@ -1112,14 +1117,6 @@ static void fc_lport_flogi_send(struct fc_lport *lport)
 		fc_lport_error(lport, fp);
 }
 
-void fc_lport_enter_flogi(struct fc_lport *lport)
-{
-	if (fc_lport_debug)
-		FC_DBG("Processing FLOGI state\n");
-	fc_lport_state_enter(lport, LPORT_ST_FLOGI);
-	fc_lport_flogi_send(lport);
-}
-
 /* Configure a fc_lport */
 int fc_lport_config(struct fc_lport *lport)
 {




More information about the devel mailing list