Minor: Fixed spacing.
authorFlorian Pose <fp@igh-essen.com>
Fri, 16 Dec 2011 16:26:16 +0100
changeset 2181 cac59f7a42c4
parent 2176 ad4f7514ba71
child 2182 4dc680830349
Minor: Fixed spacing.
master/fsm_slave.c
--- a/master/fsm_slave.c	Fri Dec 16 11:42:55 2011 +0100
+++ b/master/fsm_slave.c	Fri Dec 16 16:26:16 2011 +0100
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- *  $Id$
+ *  $Id: fsm_slave.c,v 83e9160319ec 2011/08/01 15:02:45 fp $
  *
  *  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
  *
@@ -138,7 +138,6 @@
     // do nothing
 }
 
-
 /*****************************************************************************/
 
 /** Slave state: READY.
@@ -189,7 +188,8 @@
         }
 
         if (slave->current_state == EC_SLAVE_STATE_INIT) {
-            EC_SLAVE_WARN(slave, "Aborting SDO request %p, slave is in INIT.\n",request);
+            EC_SLAVE_WARN(slave, "Aborting SDO request %p,"
+                    " slave is in INIT.\n", request);
             request->req.state = EC_INT_REQUEST_FAILURE;
             kref_put(&request->refcount,ec_master_sdo_request_release);
             wake_up(&slave->sdo_queue);
@@ -201,7 +201,7 @@
         request->req.state = EC_INT_REQUEST_BUSY;
 
         // Found pending SDO request. Execute it!
-        EC_SLAVE_DBG(slave, 1, "Processing SDO request %p...\n",request);
+        EC_SLAVE_DBG(slave, 1, "Processing SDO request %p...\n", request);
 
         // Start SDO transfer
         fsm->sdo_request = request;
@@ -225,26 +225,25 @@
     ec_slave_t *slave = fsm->slave;
     ec_master_sdo_request_t *request = fsm->sdo_request;
 
-    if (ec_fsm_coe_exec(&fsm->fsm_coe))
-    {
+    if (ec_fsm_coe_exec(&fsm->fsm_coe)) {
         ec_slave_mbox_queue_datagrams(slave, fsm->mbox);
         return;
     }
     if (!ec_fsm_coe_success(&fsm->fsm_coe)) {
-        EC_SLAVE_ERR(slave, "Failed to process SDO request %p.\n",request);
+        EC_SLAVE_ERR(slave, "Failed to process SDO request %p.\n", request);
         request->req.state = EC_INT_REQUEST_FAILURE;
-        kref_put(&request->refcount,ec_master_sdo_request_release);
+        kref_put(&request->refcount, ec_master_sdo_request_release);
         wake_up(&slave->sdo_queue);
         fsm->sdo_request = NULL;
         fsm->state = ec_fsm_slave_state_idle;
         return;
     }
 
-    EC_SLAVE_DBG(slave, 1, "Finished SDO request %p.\n",request);
+    EC_SLAVE_DBG(slave, 1, "Finished SDO request %p.\n", request);
 
     // SDO request finished
     request->req.state = EC_INT_REQUEST_SUCCESS;
-    kref_put(&request->refcount,ec_master_sdo_request_release);
+    kref_put(&request->refcount, ec_master_sdo_request_release);
     wake_up(&slave->sdo_queue);
 
     fsm->sdo_request = NULL;
@@ -268,9 +267,9 @@
     list_for_each_entry_safe(request, next, &slave->foe_requests, list) {
         if (slave->current_state & EC_SLAVE_STATE_ACK_ERR) {
             EC_SLAVE_WARN(slave, "Aborting FOE request %p,"
-                    " slave has error flag set.\n",request);
+                    " slave has error flag set.\n", request);
             request->req.state = EC_INT_REQUEST_FAILURE;
-            kref_put(&request->refcount,ec_master_foe_request_release);
+            kref_put(&request->refcount, ec_master_foe_request_release);
             wake_up(&slave->foe_queue);
             fsm->sdo_request = NULL;
             fsm->state = ec_fsm_slave_state_idle;
@@ -279,7 +278,7 @@
         list_del_init(&request->list); // dequeue
         request->req.state = EC_INT_REQUEST_BUSY;
 
-        EC_SLAVE_DBG(slave, 1, "Processing FoE request %p.\n",request);
+        EC_SLAVE_DBG(slave, 1, "Processing FoE request %p.\n", request);
 
         fsm->foe_request = request;
         fsm->state = ec_fsm_slave_state_foe_request;
@@ -302,16 +301,15 @@
     ec_slave_t *slave = fsm->slave;
     ec_master_foe_request_t *request = fsm->foe_request;
 
-    if (ec_fsm_foe_exec(&fsm->fsm_foe))
-    {
+    if (ec_fsm_foe_exec(&fsm->fsm_foe)) {
         ec_slave_mbox_queue_datagrams(slave, fsm->mbox);
         return;
     }
 
     if (!ec_fsm_foe_success(&fsm->fsm_foe)) {
-        EC_SLAVE_ERR(slave, "Failed to handle FoE request %p.\n",request);
+        EC_SLAVE_ERR(slave, "Failed to handle FoE request %p.\n", request);
         request->req.state = EC_INT_REQUEST_FAILURE;
-        kref_put(&request->refcount,ec_master_foe_request_release);
+        kref_put(&request->refcount, ec_master_foe_request_release);
         wake_up(&slave->foe_queue);
         fsm->foe_request = NULL;
         fsm->state = ec_fsm_slave_state_idle;
@@ -319,11 +317,11 @@
     }
 
     // finished transferring FoE
-    EC_SLAVE_DBG(slave, 1, "FoE request %p successfully transferred %zu bytes.\n",
-            request,request->req.data_size);
+    EC_SLAVE_DBG(slave, 1, "FoE request %p successfully"
+            " transferred %zu bytes.\n", request, request->req.data_size);
 
     request->req.state = EC_INT_REQUEST_SUCCESS;
-    kref_put(&request->refcount,ec_master_foe_request_release);
+    kref_put(&request->refcount, ec_master_foe_request_release);
     wake_up(&slave->foe_queue);
 
     fsm->foe_request = NULL;
@@ -351,7 +349,7 @@
             EC_SLAVE_WARN(slave, "Aborting SoE request,"
                     " slave has error flag set.\n");
             request->req.state = EC_INT_REQUEST_FAILURE;
-            kref_put(&request->refcount,ec_master_soe_request_release);
+            kref_put(&request->refcount, ec_master_soe_request_release);
             wake_up(&slave->soe_queue);
             fsm->state = ec_fsm_slave_state_idle;
             return 0;
@@ -360,7 +358,7 @@
         if (slave->current_state == EC_SLAVE_STATE_INIT) {
             EC_SLAVE_WARN(slave, "Aborting SoE request, slave is in INIT.\n");
             request->req.state = EC_INT_REQUEST_FAILURE;
-            kref_put(&request->refcount,ec_master_soe_request_release);
+            kref_put(&request->refcount, ec_master_soe_request_release);
             wake_up(&slave->soe_queue);
             fsm->state = ec_fsm_slave_state_idle;
             return 0;
@@ -401,7 +399,7 @@
     if (!ec_fsm_soe_success(&fsm->fsm_soe)) {
         EC_SLAVE_ERR(slave, "Failed to process SoE request.\n");
         request->req.state = EC_INT_REQUEST_FAILURE;
-        kref_put(&request->refcount,ec_master_soe_request_release);
+        kref_put(&request->refcount, ec_master_soe_request_release);
         wake_up(&slave->soe_queue);
         fsm->soe_request = NULL;
         fsm->state = ec_fsm_slave_state_idle;
@@ -412,7 +410,7 @@
 
     // SoE request finished
     request->req.state = EC_INT_REQUEST_SUCCESS;
-    kref_put(&request->refcount,ec_master_soe_request_release);
+    kref_put(&request->refcount, ec_master_soe_request_release);
     wake_up(&slave->soe_queue);
 
     fsm->soe_request = NULL;