Cleans up whitespace and some variable
initializations.

Signed-off-by: Robert Love <[email protected]>
---
 fcnsq.c           |   38 ++++++-----
 fcoeadm_display.c |  119 ++++++++++++++++++-----------------
 fcoemon.c         |  117 +++++++++++++++++-----------------
 fcping.c          |  181 +++++++++++++++++++++++++++--------------------------
 fcrls.c           |   61 +++++++++---------
 fipvlan.c         |   34 +++++-----
 6 files changed, 276 insertions(+), 274 deletions(-)

diff --git a/fcnsq.c b/fcnsq.c
index 4039cb4..8722b21 100644
--- a/fcnsq.c
+++ b/fcnsq.c
@@ -232,8 +232,8 @@ fail:
                print_err("%s ioctl failed: %s\n", __func__, strerror(errno));
        else
                print_err("%s command failed: %s, %s\n", __func__,
-                               rjt_reason[ct_rjt_reason(rjt)],
-                               rjt_explan[ct_rjt_explan(rjt)]);
+                         rjt_reason[ct_rjt_reason(rjt)],
+                         rjt_explan[ct_rjt_explan(rjt)]);
        return rjt;
 }
 
@@ -253,8 +253,8 @@ fail:
                print_err("%s ioctl failed: %s\n", __func__, strerror(errno));
        else
                print_err("%s command failed: %s, %s\n", __func__,
-                               rjt_reason[ct_rjt_reason(rjt)],
-                               rjt_explan[ct_rjt_explan(rjt)]);
+                         rjt_reason[ct_rjt_reason(rjt)],
+                         rjt_explan[ct_rjt_explan(rjt)]);
        return rjt;
 }
 
@@ -288,8 +288,8 @@ static int gspn_id(int bsg, u32 fcid)
        }
        if (gspn_resp.hdr.ct_cmd != htons(FC_FS_ACC)) {
                print_err("%s command failed: %s, %s\n", __func__,
-                               rjt_reason[gspn_resp.hdr.ct_reason],
-                               rjt_explan[gspn_resp.hdr.ct_explan]);
+                         rjt_reason[gspn_resp.hdr.ct_reason],
+                         rjt_explan[gspn_resp.hdr.ct_explan]);
                return ct_rjt(gspn_resp.hdr.ct_reason, gspn_resp.hdr.ct_explan);
        }
        print_result("Symbolic Port Name", "%s\n", gspn_resp.name);
@@ -325,8 +325,8 @@ static int gsnn_nn(int bsg, u64 wwnn)
        }
        if (gsnn_resp.hdr.ct_cmd != htons(FC_FS_ACC)) {
                print_err("%s command failed: %s, %s\n", __func__,
-                               rjt_reason[gsnn_resp.hdr.ct_reason],
-                               rjt_explan[gsnn_resp.hdr.ct_explan]);
+                         rjt_reason[gsnn_resp.hdr.ct_reason],
+                         rjt_explan[gsnn_resp.hdr.ct_explan]);
                return ct_rjt(gsnn_resp.hdr.ct_reason, gsnn_resp.hdr.ct_explan);
        }
        print_result("Symbolic Node Name", "%s\n", gsnn_resp.name);
@@ -353,17 +353,17 @@ static const struct option options[] = {
 static void help(int status)
 {
        printf(
-"Usage: fcnsq <host#> <command> [options]\n"
-"Commands:\n"
-"  --gpn  <port id>\n"
-"  --gnn  <port id>\n"
-"  --gspn <port id>\n"
-"  --gsnn <world wide node name>\n"
-"Options:\n"
-"  --quiet     print minimal results on success, and no error messages\n"
-"\n"
-"Port IDs and World Wide Names must be specified in hexadecimal.\n"
-      );
+               "Usage: fcnsq <host#> <command> [options]\n"
+               "Commands:\n"
+               "  --gpn  <port id>\n"
+               "  --gnn  <port id>\n"
+               "  --gspn <port id>\n"
+               "  --gsnn <world wide node name>\n"
+               "Options:\n"
+               "  --quiet      print minimal results on success, and no error 
messages\n"
+               "\n"
+               "Port IDs and World Wide Names must be specified in 
hexadecimal.\n"
+               );
        exit(status);
 }
 
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 6bbfa1d..6b69148 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -43,11 +43,11 @@
 
 /* #define TEST_HBAAPI_V1 */
 #ifdef TEST_HBAAPI_V1
-  #define HBA_FCP_SCSI_ENTRY    HBA_FCPSCSIENTRY
-  #define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPING
+#define HBA_FCP_SCSI_ENTRY      HBA_FCPSCSIENTRY
+#define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPING
 #else
-  #define HBA_FCP_SCSI_ENTRY    HBA_FCPSCSIENTRYV2
-  #define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPINGV2
+#define HBA_FCP_SCSI_ENTRY      HBA_FCPSCSIENTRYV2
+#define HBA_FCP_TARGET_MAPPING HBA_FCPTARGETMAPPINGV2
 #endif
 /* #define TEST_REPORT_LUNS */
 /* #define TEST_READ_CAP_V1 */
@@ -120,7 +120,7 @@ struct sa_nameval port_speeds[] = {
  */
 static const char *
 sa_enum_decode(char *buf, size_t len,
-               const struct sa_nameval *tp, u_int32_t val)
+              const struct sa_nameval *tp, u_int32_t val)
 {
        snprintf(buf, len, "Unknown");
        for (; tp->nv_name != NULL; tp++) {
@@ -256,7 +256,7 @@ static void show_hba_info(HBA_ADAPTERATTRIBUTES *hba_info)
        printf("    Manufacturer:     %s\n", hba_info->Manufacturer);
        printf("    Serial Number:    %s\n", hba_info->SerialNumber);
        printf("    Driver:           %s %s\n", hba_info->DriverName,
-                                               hba_info->DriverVersion);
+              hba_info->DriverVersion);
        printf("    Number of Ports:  %d\n", hba_info->NumberOfPorts);
        printf("\n");
 }
@@ -268,22 +268,22 @@ static void show_port_info(HBA_ADAPTERATTRIBUTES 
*hba_info,
        int len = sizeof(buf);
 
        printf("        Symbolic Name:     %s\n",
-                                       lp_info->PortSymbolicName);
+              lp_info->PortSymbolicName);
 
        printf("        OS Device Name:    %s\n",
-                                       lp_info->OSDeviceName);
+              lp_info->OSDeviceName);
 
        printf("        Node Name:         0x");
-                                       show_wwn(lp_info->NodeWWN.wwn);
-                                       printf("    \n");
+       show_wwn(lp_info->NodeWWN.wwn);
+       printf("\n");
 
        printf("        Port Name:         0x");
-                                       show_wwn(lp_info->PortWWN.wwn);
-                                       printf("    \n");
+       show_wwn(lp_info->PortWWN.wwn);
+       printf("\n");
 
        printf("        FabricName:        0x");
-                                       show_wwn(lp_info->FabricName.wwn);
-                                       printf("    \n");
+       show_wwn(lp_info->FabricName.wwn);
+       printf("\n");
 
        sa_enum_decode(buf, len, port_speeds, lp_info->PortSpeed);
        printf("        Speed:             %s\n", buf);
@@ -292,10 +292,10 @@ static void show_port_info(HBA_ADAPTERATTRIBUTES 
*hba_info,
        printf("        Supported Speed:   %s\n", buf);
 
        printf("        MaxFrameSize:      %d\n",
-                                       lp_info->PortMaxFrameSize);
+              lp_info->PortMaxFrameSize);
 
        printf("        FC-ID (Port ID):   0x%06X\n",
-                                       lp_info->PortFcId);
+              lp_info->PortFcId);
 
        sa_enum_decode(buf, sizeof(buf), port_states, lp_info->PortState);
        printf("        State:             %s\n", buf);
@@ -319,12 +319,12 @@ static void show_target_info(const char *symbolic_name,
        printf("    Roles:            %s\n", buf);
 
        printf("    Node Name:        0x");
-                               show_wwn(rp_info->NodeWWN.wwn);
-                               printf("    \n");
+       show_wwn(rp_info->NodeWWN.wwn);
+       printf("\n");
 
        printf("    Port Name:        0x");
-                               show_wwn(rp_info->PortWWN.wwn);
-                               printf("    \n");
+       show_wwn(rp_info->PortWWN.wwn);
+       printf("\n");
 
        rc = sa_sys_read_u32(rp_info->OSDeviceName, "scsi_target_id", &tgt_id);
        if (tgt_id != -1)
@@ -333,7 +333,7 @@ static void show_target_info(const char *symbolic_name,
        printf("    MaxFrameSize:     %d\n", rp_info->PortMaxFrameSize);
 
        printf("    OS Device Name:   %s\n",
-                               strrchr(rp_info->OSDeviceName, '/') + 1);
+              strrchr(rp_info->OSDeviceName, '/') + 1);
 
        printf("    FC-ID (Port ID):  0x%06X\n", rp_info->PortFcId);
 
@@ -437,8 +437,8 @@ get_inquiry_data_v2(HBA_HANDLE hba_handle,
 #ifdef TEST_HBAAPI_V1
 static HBA_STATUS
 get_device_capacity_v1(HBA_HANDLE hba_handle,
-                   HBA_FCPSCSIENTRY *ep,
-                   char *buf, size_t len)
+                      HBA_FCPSCSIENTRY *ep,
+                      char *buf, size_t len)
 {
        char sense[128];
        HBA_UINT32 rlen;
@@ -475,9 +475,9 @@ get_device_capacity_v1(HBA_HANDLE hba_handle,
 #else
 static HBA_STATUS
 get_device_capacity_v2(HBA_HANDLE hba_handle,
-                   HBA_PORTATTRIBUTES *lp_info,
-                   HBA_FCPSCSIENTRYV2 *ep,
-                   char *buf, size_t len)
+                      HBA_PORTATTRIBUTES *lp_info,
+                      HBA_FCPSCSIENTRYV2 *ep,
+                      char *buf, size_t len)
 {
        char sense[128];
        HBA_UINT32 rlen;
@@ -554,7 +554,7 @@ get_device_serial_number(HBA_HANDLE hba_handle,
        unit_sn = (struct scsi_inquiry_unit_sn *)rspbuf;
        unit_sn->is_serial[unit_sn->is_page_len] = '\0';
        sa_strncpy_safe(buf, buflen, (char *)unit_sn->is_serial,
-                                    (size_t)unit_sn->is_page_len);
+                       (size_t)unit_sn->is_page_len);
        return HBA_STATUS_OK;
 }
 #endif
@@ -597,11 +597,11 @@ get_report_luns_data_v1(HBA_HANDLE hba_handle, 
HBA_FCPSCSIENTRYV2 *ep)
                rlen = (HBA_UINT32) sizeof(rspbuf);
                slen = (HBA_UINT32) sizeof(sense);
                status = HBA_SendReportLUNs(hba_handle,
-                                            ep->FcpId.PortWWN,
-                                            rspbuf,
-                                            rlen,
-                                            sense,
-                                            slen);
+                                           ep->FcpId.PortWWN,
+                                           rspbuf,
+                                           rlen,
+                                           sense,
+                                           slen);
                if (status == HBA_STATUS_OK) {
                        show_report_luns_data(rspbuf);
                        return HBA_STATUS_OK;
@@ -621,8 +621,8 @@ get_report_luns_data_v1(HBA_HANDLE hba_handle, 
HBA_FCPSCSIENTRYV2 *ep)
 
 static HBA_STATUS
 get_report_luns_data_v2(HBA_HANDLE hba_handle,
-                      HBA_PORTATTRIBUTES *lp_info,
-                      HBA_FCPSCSIENTRYV2 *ep)
+                       HBA_PORTATTRIBUTES *lp_info,
+                       HBA_FCPSCSIENTRYV2 *ep)
 {
        HBA_STATUS status;
        char rspbuf[512 * sizeof(u_int64_t)]; /* max 512 luns */
@@ -669,9 +669,9 @@ static void
 show_short_lun_info_header(void)
 {
        printf("    LUN ID  Device Name   Capacity   "
-               "Block Size  Description\n");
+              "Block Size  Description\n");
        printf("    ------  -----------  ----------  ----------  "
-               "----------------------------\n");
+              "----------------------------\n");
 }
 
 static void
@@ -694,7 +694,7 @@ show_short_lun_info(HBA_FCP_SCSI_ENTRY *ep, char *inqbuf,
 
        /* Get device capacity */
        cap = (u_int64_t) net32_get(&rcap_resp->rc_block_len) *
-                         net32_get(&rcap_resp->rc_lba);
+               net32_get(&rcap_resp->rc_lba);
        cap_abbr = cap / (1024.0 * 1024.0);
        abbr = "MB";
        if (cap_abbr >= 1024) {
@@ -721,9 +721,9 @@ show_short_lun_info(HBA_FCP_SCSI_ENTRY *ep, char *inqbuf,
 
        /* Show the LUN info */
        printf("%10d  %-11s  %10s  %7d     %s %s (rev %s)\n",
-               ep->ScsiId.ScsiOSLun, ep->ScsiId.OSDeviceName,
-               capstr, net32_get(&rcap_resp->rc_block_len),
-               vendor, model, rev);
+              ep->ScsiId.ScsiOSLun, ep->ScsiId.OSDeviceName,
+              capstr, net32_get(&rcap_resp->rc_block_len),
+              vendor, model, rev);
 }
 
 static void
@@ -765,7 +765,7 @@ show_full_lun_info(HBA_HANDLE hba_handle,
 
        /* Get device capacity */
        cap = (u_int64_t) net32_get(&rcap_resp->rc_block_len) *
-                         net32_get(&rcap_resp->rc_lba);
+               net32_get(&rcap_resp->rc_lba);
        cap_abbr = cap / (1024.0 * 1024.0);
        abbr = "MB";
        if (cap_abbr >= 1024) {
@@ -789,25 +789,25 @@ show_full_lun_info(HBA_HANDLE hba_handle,
        /* Show lun info */
        printf("    LUN #%d Information:\n", ep->ScsiId.ScsiOSLun);
        printf("        OS Device Name:     %s\n",
-                                       ep->ScsiId.OSDeviceName);
+              ep->ScsiId.OSDeviceName);
        printf("        Description:        %s %s (rev %s)\n",
-                                       vendor, model, rev);
+              vendor, model, rev);
        printf("        Ethernet Port FCID: 0x%06X\n",
-                                       lp_info->PortFcId);
+              lp_info->PortFcId);
        printf("        Target FCID:        0x%06X\n",
-                                       rp_info->PortFcId);
+              rp_info->PortFcId);
        if (tgt_id == -1)
                printf("        Target ID:          (None)\n");
        else
                printf("        Target ID:          %u\n", tgt_id);
        printf("        LUN ID:             %d\n",
-                                       ep->ScsiId.ScsiOSLun);
+              ep->ScsiId.ScsiOSLun);
 
        printf("        Capacity:           %s\n", capstr);
        printf("        Capacity in Blocks: %d\n",
-                                       net32_get(&rcap_resp->rc_lba));
+              net32_get(&rcap_resp->rc_lba));
        printf("        Block Size:         %d bytes\n",
-                                       net32_get(&rcap_resp->rc_block_len));
+              net32_get(&rcap_resp->rc_block_len));
        pqual = inq->is_periph & SCSI_INQ_PQUAL_MASK;
        if (pqual == SCSI_PQUAL_ATT)
                printf("        Status:             Attached\n");
@@ -815,7 +815,7 @@ show_full_lun_info(HBA_HANDLE hba_handle,
                printf("        Status:             Detached\n");
        else if (pqual == SCSI_PQUAL_NC)
                printf("        Status:             "
-                       "Not capable of attachment\n");
+                      "Not capable of attachment\n");
 
 #ifdef TEST_DEV_SERIAL_NO
        /* Show the serial number of the device */
@@ -875,7 +875,7 @@ get_device_map(HBA_HANDLE hba_handle, HBA_PORTATTRIBUTES 
*lp_info,
                status = HBA_GetFcpTargetMapping(hba_handle, map);
 #else
                status = HBA_GetFcpTargetMappingV2(
-                               hba_handle, lp_info->PortWWN, map);
+                       hba_handle, lp_info->PortWWN, map);
 #endif
                if (map->NumberOfEntries > limit) {
                        limit = map->NumberOfEntries + LUN_COUNT_INCR;
@@ -951,10 +951,10 @@ scan_device_map(HBA_HANDLE hba_handle,
                /* Issue standard inquiry */
 #ifdef TEST_HBAAPI_V1
                status = get_inquiry_data_v1(hba_handle, ep,
-                                       inqbuf, sizeof(inqbuf));
+                                            inqbuf, sizeof(inqbuf));
 #else
                status = get_inquiry_data_v2(hba_handle, lp_info,
-                                       ep, inqbuf, sizeof(inqbuf));
+                                            ep, inqbuf, sizeof(inqbuf));
 #endif
                if (status != HBA_STATUS_OK)
                        continue;
@@ -963,11 +963,12 @@ scan_device_map(HBA_HANDLE hba_handle,
                /* Issue read capacity */
 #ifdef TEST_HBAAPI_V1
                status = get_device_capacity_v1(hba_handle, ep,
-                                       (char *)&rcap_resp, sizeof(rcap_resp));
+                                               (char *)&rcap_resp,
+                                               sizeof(rcap_resp));
 #else
                status = get_device_capacity_v2(hba_handle, lp_info,
-                                       ep, (char *)&rcap_resp,
-                                       sizeof(rcap_resp));
+                                               ep, (char *)&rcap_resp,
+                                               sizeof(rcap_resp));
 #endif
                if (status != HBA_STATUS_OK)
                        continue;
@@ -987,11 +988,11 @@ scan_device_map(HBA_HANDLE hba_handle,
 
 #ifdef TEST_REPORT_LUNS
                if (i == 0) {   /* only issue report luns to the first LUN */
- #ifdef TEST_HBAAPI_V1
+#ifdef TEST_HBAAPI_V1
                        get_report_luns_data_v1(hba_handle, ep);
- #else
+#else
                        get_report_luns_data_v2(hba_handle, lp_info, ep);
- #endif
+#endif
                }
 #endif
        }
@@ -1209,7 +1210,7 @@ enum fcoe_status display_port_stats(const char *ifname, 
int interval)
                if (retval != HBA_STATUS_OK &&
                    retval != HBA_STATUS_ERROR_NOT_SUPPORTED) {
                        fprintf(stderr, "HBA_GetFC4Statistics failed, "
-                                "status=%d\n", retval);
+                               "status=%d\n", retval);
                        break;
                }
                if (retval == HBA_STATUS_ERROR_NOT_SUPPORTED) {
diff --git a/fcoemon.c b/fcoemon.c
index 5b96fcd..340a0bf 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -327,7 +327,7 @@ static int fcm_read_config_files(void)
 
                if (!next) {
                        FCM_LOG_ERR(errno, "failed to allocate fcoe_port %s",
-                               dp->d_name);
+                                   dp->d_name);
                        continue;
                }
                strncpy(file, CONFIG_DIR "/", sizeof(file));
@@ -533,10 +533,10 @@ int fcm_vlan_disc_handler(struct fiphdr *fh, struct 
sockaddr_ll *sa, void *arg)
                        memcpy(mac, ((struct fip_tlv_mac_addr *)tlv)->mac_addr,
                               ETHER_ADDR_LEN);
                        break;
-               /*
-                * this expects to see the MAC_ADDR TLV first,
-                * and is broken if not
-                */
+                       /*
+                        * this expects to see the MAC_ADDR TLV first,
+                        * and is broken if not
+                        */
                case FIP_TLV_VLAN:
                        if (tlv->tlv_len != 1) {
                                FCM_LOG_ERR(EINVAL, "bad length on VLAN TLV");
@@ -826,10 +826,10 @@ static void fcm_dcbd_state_set(struct fcm_netif *ff,
        if (new_state == FCD_ERROR) {
                ff->dcbd_retry_cnt++;
                FCM_LOG_DEV_DBG(ff, "%s: SETTING lldpad RETRY TIMER  = %d\n",
-                       ff->ifname,
-                       ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT);
+                               ff->ifname,
+                               ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT);
                sa_timer_set(&ff->dcbd_retry_timer,
-                       ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT);
+                            ff->dcbd_retry_cnt * DCBD_REQ_RETRY_TIMEOUT);
        }
 
        ff->ff_dcbd_state = new_state;
@@ -854,9 +854,9 @@ static void update_fcoe_port_state(struct fcoe_port *p, 
unsigned int type,
                 * up).
                 */
                if ((t == FCP_REAL_IFNAME) ||
-                  ((t == FCP_CFG_IFNAME) &&
-                   (ff->ff_operstate == IF_OPER_UNKNOWN) &&
-                   (operstate == IF_OPER_UP)))
+                   ((t == FCP_CFG_IFNAME) &&
+                    (ff->ff_operstate == IF_OPER_UNKNOWN) &&
+                    (operstate == IF_OPER_UP)))
                        ff->ff_operstate = operstate;
 
                if (!p->fcoe_enable) {
@@ -872,10 +872,10 @@ static void update_fcoe_port_state(struct fcoe_port *p, 
unsigned int type,
                                 * interface is configured on a VLAN.
                                 */
                                if (!((t == FCP_REAL_IFNAME) &&
-                                   strncmp(p->ifname, p->real_ifname,
-                                           IFNAMSIZ)))
+                                     strncmp(p->ifname, p->real_ifname,
+                                             IFNAMSIZ)))
                                        fcm_dcbd_state_set(ff,
-                                               FCD_GET_DCB_STATE);
+                                                          FCD_GET_DCB_STATE);
                        } else {
                                /* hold off on auto-created VLAN ports until
                                 * VLAN discovery can validate that the setup
@@ -1137,7 +1137,7 @@ static struct fcm_netif *fcm_netif_lookup_create(char 
*ifname)
        if (ff != NULL) {
                snprintf(ff->ifname, sizeof(ff->ifname), "%s", ifname);
                sa_timer_init(&ff->dcbd_retry_timer, fcm_dcbd_retry_timeout,
-                       (void *)ff);
+                             (void *)ff);
                FCM_LOG_DEV_DBG(ff, "Monitoring port %s\n", ifname);
        }
 
@@ -1149,9 +1149,7 @@ static struct fcm_netif *fcm_netif_lookup_create(char 
*ifname)
  */
 static struct fcm_netif *fcm_netif_lookup(char *ifname)
 {
-       struct fcm_netif *ff, *curr;
-
-       ff = NULL;
+       struct fcm_netif *curr, *ff = NULL;
 
        TAILQ_FOREACH(curr, &fcm_netif_head, ff_list) {
                if (strcmp(curr->ifname, ifname) == 0) {
@@ -1236,7 +1234,7 @@ static void fcm_dcbd_retry_timeout(void *arg)
 
        ASSERT(ff);
        FCM_LOG_DBG("%s: lldpad retry TIMEOUT occurred [%d]",
-               ff->ifname, ff->dcbd_retry_cnt);
+                   ff->ifname, ff->dcbd_retry_cnt);
 
        fcm_dcbd_state_set(ff, FCD_GET_DCB_STATE);
        fcm_netif_advance(ff);
@@ -1377,7 +1375,7 @@ static void fcm_dcbd_rx(void *arg)
 /*
  * returns:  1 if request was successfully written
  *           0 if the write failed
-*/
+ */
 static int fcm_dcbd_request(char *req)
 {
        size_t len;
@@ -1552,28 +1550,28 @@ static enum fcp_action validate_dcbd_info(struct 
fcm_netif *ff)
 
                if (dcbon && !ff->ff_app_info.willing) {
                        FCM_LOG_DEV(ff,
-                               "WARNING: FCoE willing mode is false\n");
+                                   "WARNING: FCoE willing mode is false\n");
                        errors++;
                }
                if (dcbon && !ff->ff_app_info.advertise) {
                        FCM_LOG_DEV(ff,
-                               "WARNING: FCoE advertise mode is false\n");
+                                   "WARNING: FCoE advertise mode is false\n");
                        errors++;
                }
                if (dcbon && !ff->ff_pfc_info.willing) {
                        FCM_LOG_DEV(ff,
-                               "WARNING: PFC willing mode is false\n");
+                                   "WARNING: PFC willing mode is false\n");
                        errors++;
                }
                if (dcbon && !ff->ff_pfc_info.advertise) {
                        FCM_LOG_DEV(ff,
-                               "WARNING: PFC advertise mode is false\n");
+                                   "WARNING: PFC advertise mode is false\n");
                        errors++;
                }
 
                if (errors)
                        FCM_LOG_DEV_DBG(ff,
-                           "WARNING: DCB may not be configured correctly\n");
+                                       "WARNING: DCB may not be configured 
correctly\n");
                else
                        FCM_LOG_DEV_DBG(ff, "DCB is configured correctly\n");
 
@@ -1584,7 +1582,7 @@ static enum fcp_action validate_dcbd_info(struct 
fcm_netif *ff)
        if (!dcbon ||
            !ff->ff_app_info.enable ||
            (ff->ff_app_info.op_mode && ff->ff_pfc_info.op_mode &&
-           !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg))) {
+            !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg))) {
 
                if (dcbon && !ff->ff_dcb_state)
                        FCM_LOG_DEV(ff, "WARNING: DCB is disabled\n");
@@ -1593,12 +1591,12 @@ static enum fcp_action validate_dcbd_info(struct 
fcm_netif *ff)
                        FCM_LOG_DEV(ff, "WARNING: FCoE enable is off\n");
 
                if (dcbon &&
-                       !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg))
+                   !(ff->ff_pfc_info.u.pfcup & ff->ff_app_info.u.appcfg))
                        FCM_LOG_DEV(ff,
-                               "WARNING: FCoE priority (0x%02x) doesn't "
-                               "intersect with PFC priority (0x%02x)\n",
-                               ff->ff_app_info.u.appcfg,
-                               ff->ff_pfc_info.u.pfcup);
+                                   "WARNING: FCoE priority (0x%02x) doesn't "
+                                   "intersect with PFC priority (0x%02x)\n",
+                                   ff->ff_app_info.u.appcfg,
+                                   ff->ff_pfc_info.u.pfcup);
 
                return FCP_DISABLE_IF;
        }
@@ -1671,9 +1669,8 @@ static void clear_dcbd_info(struct fcm_netif *ff)
  */
 static void fcm_dcbd_set_config(struct fcm_netif *ff)
 {
-       if (ff->ff_dcbd_state == FCD_SEND_CONF) {
+       if (ff->ff_dcbd_state == FCD_SEND_CONF)
                fcm_dcbd_state_set(ff, FCD_GET_PFC_CONFIG);
-       }
 }
 
 /**
@@ -1745,9 +1742,10 @@ static void fcm_dcbd_get_oper(struct fcm_netif *ff, char 
*resp, char *cp)
                                fcm_dcbd_state_set(ff, FCD_GET_APP_OPER);
 
                        FCM_LOG_DEV_DBG(ff, "PFC feature is %ssynced",
-                               ff->ff_pfc_info.syncd ? "" : "not ");
+                                       ff->ff_pfc_info.syncd ? "" : "not ");
                        FCM_LOG_DEV_DBG(ff, "PFC operating mode is %s",
-                               ff->ff_pfc_info.op_mode ? "on" : "off ");
+                                       ff->ff_pfc_info.op_mode ? "on" :
+                                       "off ");
                        break;
 
                case FCD_GET_APP_OPER:
@@ -1757,9 +1755,11 @@ static void fcm_dcbd_get_oper(struct fcm_netif *ff, char 
*resp, char *cp)
                                fcm_dcbd_state_set(ff, FCD_DONE);
 
                        FCM_LOG_DEV_DBG(ff, "FCoE feature is %ssynced",
-                               ff->ff_app_info.syncd ? "" : "not ");
+                                       ff->ff_app_info.syncd ? "" :
+                                       "not ");
                        FCM_LOG_DEV_DBG(ff, "FCoE operating mode is %s",
-                               ff->ff_app_info.op_mode ? "on" : "off ");
+                                       ff->ff_app_info.op_mode ? "on" :
+                                       "off ");
                        break;
 
                default:
@@ -1821,13 +1821,13 @@ static void fcm_dcbd_cmd_resp(char *resp, cmd_status st)
         */
        state = ff->ff_dcbd_state;
        if (((cmd == CMD_GET_CONFIG) &&
-               ((state == FCD_GET_DCB_STATE && feature == FEATURE_DCB) ||
-               (state == FCD_GET_PFC_CONFIG && feature == FEATURE_PFC) ||
-               (state == FCD_GET_APP_CONFIG && feature == FEATURE_APP)))
-               ||
+            ((state == FCD_GET_DCB_STATE && feature == FEATURE_DCB) ||
+             (state == FCD_GET_PFC_CONFIG && feature == FEATURE_PFC) ||
+             (state == FCD_GET_APP_CONFIG && feature == FEATURE_APP)))
+           ||
            ((cmd == CMD_GET_OPER) &&
-               ((state == FCD_GET_PFC_OPER && feature == FEATURE_PFC) ||
-               (state == FCD_GET_APP_OPER && feature == FEATURE_APP)))) {
+            ((state == FCD_GET_PFC_OPER && feature == FEATURE_PFC) ||
+             (state == FCD_GET_APP_OPER && feature == FEATURE_APP)))) {
 
                /* the response matches the current pending query */
                ff->response_pending = 0;
@@ -1896,14 +1896,14 @@ static void fcm_dcbd_event(char *msg, size_t len)
        p = fcm_find_fcoe_port(ff->ifname, FCP_REAL_IFNAME);
        while (p) {
                if (p->dcb_required && p->last_msg_type != RTM_DELLINK &&
-                       p->fcoe_enable)
+                   p->fcoe_enable)
                        break;
                p = fcm_find_next_fcoe_port(p, ff->ifname);
        }
 
        /*
         * dcb is not required or link was removed, ignore dcbd event
-       */
+        */
        if (!p)
                return;
 
@@ -1949,7 +1949,7 @@ static void fcm_cli_reply(struct sock_info *r, int status)
        char rbuf[MAX_MSGBUF];
        snprintf(rbuf, MSG_RBUF, "%d", status);
        sendto(r->sock, rbuf, MSG_RBUF, 0, (struct sockaddr *)&(r->from),
-                       r->fromlen);
+              r->fromlen);
 }
 
 static enum fcoe_status fcm_fcoe_if_action(char *path, char *ifname)
@@ -1960,13 +1960,13 @@ static enum fcoe_status fcm_fcoe_if_action(char *path, 
char *ifname)
        fp = fopen(path, "w");
        if (!fp) {
                FCM_LOG_ERR(errno, "%s: Failed to open path %s\n",
-                                       progname, path);
+                           progname, path);
                goto err_out;
        }
 
        if (EOF == fputs(ifname, fp)) {
                FCM_LOG_ERR(errno, "%s: Failed to write %s to path %s.\n",
-                               progname, ifname, path);
+                           progname, ifname, path);
                goto out;
        }
 
@@ -2022,9 +2022,8 @@ static void fcm_fcoe_action(struct fcm_netif *ff, struct 
fcoe_port *p)
        char *ifname = p->ifname;
        char fchost[FCHOSTBUFLEN];
        char path[256];
-       enum fcoe_status rc;
+       enum fcoe_status rc = SUCCESS;
 
-       rc = SUCCESS;
        switch (p->action) {
        case FCP_CREATE_IF:
                FCM_LOG_DBG("OP: CREATE %s\n", p->ifname);
@@ -2227,7 +2226,7 @@ static void fcm_netif_advance(struct fcm_netif *ff)
  *     - if query sequence is complete - update FCoE port objects
  *       as necessary with a CREATE or DESTROY next action.
  * 2.  Process FCoE port list - handle next actions, update states, clean up
-*/
+ */
 static void fcm_handle_changes()
 {
        struct fcm_netif *ff;
@@ -2466,7 +2465,7 @@ static void fcm_srv_receive(void *arg)
 
        snum = srv_info->srv_sock;
        res = recvfrom(snum, buf, sizeof(buf) - 1,
-                       MSG_DONTWAIT, (struct sockaddr *)&from, &fromlen);
+                      MSG_DONTWAIT, (struct sockaddr *)&from, &fromlen);
        if (res < 0) {
                FCM_LOG_ERR(errno, "Fail in fcm_srv_receive()");
                return;
@@ -2625,7 +2624,7 @@ int main(int argc, char **argv)
                case 'h':
                default:
                        fcm_usage();
-                       break;
+               break;
                }
        }
        if (argc != optind)
@@ -2706,27 +2705,27 @@ static void print_errors(int errors)
 
        if (errors & 0x01)
                add_msg_to_buf(msg, sizeof(msg), "mismatch with peer",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (errors & 0x02)
                add_msg_to_buf(msg, sizeof(msg), "local configuration error",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (errors & 0x04)
                add_msg_to_buf(msg, sizeof(msg), "multiple TLV's received",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (errors & 0x08)
                add_msg_to_buf(msg, sizeof(msg), "peer error",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (errors & 0x10)
                add_msg_to_buf(msg, sizeof(msg), "multiple LLDP neighbors",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (errors & 0x20)
                add_msg_to_buf(msg, sizeof(msg), "peer feature not present",
-                             (cnt++) ? ", " : "");
+                              (cnt++) ? ", " : "");
 
        if (!errors)
                add_msg_to_buf(msg, sizeof(msg), "none", "");
diff --git a/fcping.c b/fcping.c
index 4cba6e8..76ce7e2 100644
--- a/fcping.c
+++ b/fcping.c
@@ -71,21 +71,21 @@ static void
 fp_usage()
 {
        fprintf(stderr,
-       "Usage: %s [-fqx] -i <interval> [ -c <count> ] -h <hba> "
-       "[ -s <size> ] \n"
-       "              [ -F <FC-ID> | -P <WWPN> | -N <WWNN>]\n"
-       "  flags: \n"
-       "     -f:            Flood ping\n"
-       "     -q:            Quiet! just print summary\n"
-       "     -x:            Hex dump of responses\n"
-       "     -i <interval>: Wait <interval> seconds between each ping\n"
-       "     -c <count>:    Stop after sending <count> pings\n"
-       "     -h <hba>:      eth<n>, MAC address, WWPN, or FC-ID of the HBA\n"
-       "     -s <size>:     Byte-length of ping request payload (max %lu)\n"
-       "     -F <FC-ID>:    Destination port ID\n"
-       "     -P <WWPN>:     Destination world-wide port name\n"
-       "     -N <WWNN>:     Destination world-wide node name\n",
-       cmdname, FC_MAX_PAYLOAD);
+               "Usage: %s [-fqx] -i <interval> [ -c <count> ] -h <hba> "
+               "[ -s <size> ]\n"
+               "              [ -F <FC-ID> | -P <WWPN> | -N <WWNN>]\n"
+               "  flags:\n"
+               "     -f:            Flood ping\n"
+               "     -q:            Quiet! just print summary\n"
+               "     -x:            Hex dump of responses\n"
+               "     -i <interval>: Wait <interval> seconds between each 
ping\n"
+               "     -c <count>:    Stop after sending <count> pings\n"
+               "     -h <hba>:      eth<n>, MAC address, WWPN, or FC-ID of the 
HBA\n"
+               "     -s <size>:     Byte-length of ping request payload (max 
%lu)\n"
+               "     -F <FC-ID>:    Destination port ID\n"
+               "     -P <WWPN>:     Destination world-wide port name\n"
+               "     -N <WWNN>:     Destination world-wide node name\n",
+               cmdname, FC_MAX_PAYLOAD);
        exit(1);
 }
 
@@ -118,24 +118,24 @@ struct fp_stats {
 };
 static struct fp_stats fp_stats;
 
-#define hton24(p, v) \
-do { \
-       p[0] = (((v) >> 16) & 0xFF);    \
-       p[1] = (((v) >> 8) & 0xFF);     \
-       p[2] = ((v) & 0xFF);            \
-} while (0)
-
-#define hton64(p, v) \
-do { \
-       p[0] = (u_char) ((v) >> 56) & 0xFF;     \
-       p[1] = (u_char) ((v) >> 48) & 0xFF;     \
-       p[2] = (u_char) ((v) >> 40) & 0xFF;     \
-       p[3] = (u_char) ((v) >> 32) & 0xFF;     \
-       p[4] = (u_char) ((v) >> 24) & 0xFF;     \
-       p[5] = (u_char) ((v) >> 16) & 0xFF;     \
-       p[6] = (u_char) ((v) >> 8) & 0xFF;      \
-       p[7] = (u_char) (v) & 0xFF;             \
-} while (0)
+#define hton24(p, v)                           \
+       do {                                    \
+               p[0] = (((v) >> 16) & 0xFF);    \
+               p[1] = (((v) >> 8) & 0xFF);     \
+               p[2] = ((v) & 0xFF);            \
+       } while (0)
+
+#define hton64(p, v)                                   \
+       do {                                            \
+               p[0] = (u_char) ((v) >> 56) & 0xFF;     \
+               p[1] = (u_char) ((v) >> 48) & 0xFF;     \
+               p[2] = (u_char) ((v) >> 40) & 0xFF;     \
+               p[3] = (u_char) ((v) >> 32) & 0xFF;     \
+               p[4] = (u_char) ((v) >> 24) & 0xFF;     \
+               p[5] = (u_char) ((v) >> 16) & 0xFF;     \
+               p[6] = (u_char) ((v) >> 8) & 0xFF;      \
+               p[7] = (u_char) (v) & 0xFF;             \
+       } while (0)
 
 static void sa_log_func(const char *func, const char *format, ...);
 static void sa_log_err(int, const char *func, const char *format, ...);
@@ -144,31 +144,31 @@ static void sa_log_output(const char *buf);
 /*
  * Log message.
  */
-#define SA_LOG(...) \
+#define SA_LOG(...)                                            \
        do { sa_log_func(__func__, __VA_ARGS__); } while (0)
 
-#define SA_LOG_ERR(error, ...) \
+#define SA_LOG_ERR(error, ...)                                 \
        do { sa_log_err(error, NULL, __VA_ARGS__); } while (0)
 
 /*
  * Logging exits.
  */
-#define SA_LOG_EXIT(...) \
-       do {    sa_log_func(__func__, __VA_ARGS__); \
-               if (fp_debug) \
-                       sa_log_func(__func__, \
-                       "Exiting at %s:%d", __FILE__, __LINE__); \
-               exit(1); \
+#define SA_LOG_EXIT(...)                                               \
+       do {    sa_log_func(__func__, __VA_ARGS__);                     \
+               if (fp_debug)                                           \
+                       sa_log_func(__func__,                           \
+                                   "Exiting at %s:%d", __FILE__, __LINE__); \
+               exit(1);                                                \
        } while (0)
 
-#define SA_LOG_ERR_EXIT(error, ...) \
-       do {    sa_log_func(__func__, __VA_ARGS__); \
-               if (fp_debug) \
-                       sa_log_err(error, __func__, \
-                       "Exiting at %s:%d", __FILE__, __LINE__); \
-               else \
-                       sa_log_err(error, NULL, NULL); \
-               exit(1); \
+#define SA_LOG_ERR_EXIT(error, ...)                                    \
+       do {    sa_log_func(__func__, __VA_ARGS__);                     \
+               if (fp_debug)                                           \
+                       sa_log_err(error, __func__,                     \
+                                  "Exiting at %s:%d", __FILE__, __LINE__); \
+               else                                                    \
+                       sa_log_err(error, NULL, NULL);                  \
+               exit(1);                                                \
        } while (0)
 
 #define SA_LOG_BUF_LEN  200     /* on-stack line buffer size */
@@ -251,8 +251,8 @@ sa_log_output(const char *buf)
 
 static char *
 sa_hex_format(char *buf, size_t buflen,
-               const unsigned char *data, size_t data_len,
-               unsigned int group_len, char *inter_group_sep)
+             const unsigned char *data, size_t data_len,
+             unsigned int group_len, char *inter_group_sep)
 {
        size_t rlen, tlen;
        char *bp, *sep;
@@ -367,7 +367,7 @@ fp_options(int argc, char *argv[])
                        break;
                case 'i':
                        if (sscanf(optarg, "%f", &sec) != 1 ||
-                                       sec < FP_MIN_INTVL)
+                           sec < FP_MIN_INTVL)
                                SA_LOG_EXIT("bad interval %s\n", optarg);
                        fp_interval = sec * 1000;
                        break;
@@ -381,18 +381,18 @@ fp_options(int argc, char *argv[])
                        fp_len = strtoul(optarg, &endptr, 0);
                        if (*endptr != '\0' || fp_len > FC_MAX_PAYLOAD)
                                SA_LOG_EXIT("bad size %s max %lu\n",
-                                       optarg, FC_MAX_PAYLOAD);
+                                           optarg, FC_MAX_PAYLOAD);
                        if (fp_len < 4)
                                SA_LOG_EXIT("bad size %s min %d\n",
-                                       optarg, 4);
+                                           optarg, 4);
                        break;
                case 'x':
                        fp_hex = 1;
                        break;
 
-               /*
-                * -F specifies the target FC_ID.
-                */
+                       /*
+                        * -F specifies the target FC_ID.
+                        */
                case 'F':
                        fp_did = strtoull(optarg, &endptr, 16);
                        if (*endptr != '\0')
@@ -400,10 +400,11 @@ fp_options(int argc, char *argv[])
                        targ_spec++;
                        break;
 
-               /*
-                * The -P and -N flags take a world-wide name in hex,
-                * or an ethernet addr, or an etherhost entry from /etc/ethers.
-                */
+                       /*
+                        * The -P and -N flags take a world-wide name
+                        * in hex, or an ethernet addr, or an etherhost
+                        * entry from /etc/ethers.
+                        */
                case 'N':
                        fp_node_wwn = fp_parse_wwn(optarg, "Node", 1, 0);
                        targ_spec++;
@@ -417,8 +418,8 @@ fp_options(int argc, char *argv[])
                case '?':
                default:
                        fprintf(stderr, "FC_MAX_PAYLOAD=%lu\n", FC_MAX_PAYLOAD);
-                       fp_usage();     /* exits */
-                       break;
+               fp_usage();     /* exits */
+               break;
                }
        }
        argc -= optind;
@@ -503,7 +504,7 @@ fp_find_hba(void)
                retval = HBA_GetAdapterName(i, namebuf);
                if (retval != HBA_STATUS_OK) {
                        SA_LOG("HBA_GetAdapterName"
-                               " failed, retval=%d", retval);
+                              " failed, retval=%d", retval);
                        continue;
                }
 
@@ -516,16 +517,16 @@ fp_find_hba(void)
                retval = HBA_GetAdapterAttributes(hba_handle, &hba_attrs);
                if (retval != HBA_STATUS_OK) {
                        SA_LOG("HBA_GetAdapterAttributes"
-                               " failed, retval=%d", retval);
+                              " failed, retval=%d", retval);
                        HBA_CloseAdapter(hba_handle);
                        continue;
                }
 
                retval = HBA_GetAdapterPortAttributes(
-                               hba_handle, 0, &port_attrs);
+                       hba_handle, 0, &port_attrs);
                if (retval != HBA_STATUS_OK) {
                        SA_LOG("HBA_GetAdapterPortAttributes"
-                               " failed, retval=%d", retval);
+                              " failed, retval=%d", retval);
                        HBA_CloseAdapter(hba_handle);
                        continue;
                }
@@ -560,7 +561,7 @@ fp_find_hba(void)
                }
 
                snprintf(fp_dev, sizeof(fp_dev),
-                       "fc_%s", port_attrs.OSDeviceName);
+                        "fc_%s", port_attrs.OSDeviceName);
                found = 1;
                break;
        }
@@ -578,10 +579,10 @@ fp_report(void)
 
        loss = 100.0 * (sp->fp_tx_frames - sp->fp_rx_frames) / sp->fp_tx_frames;
        printf("%d frames sent, %d received %d errors, %.3f%% loss, "
-               "avg. rt time %.3f ms\n",
-               sp->fp_tx_frames, sp->fp_rx_frames, sp->fp_rx_errors, loss,
-               sp->fp_rx_times ?  sp->fp_transit_time_us * 1.0 /
-               (1000.0 * sp->fp_rx_times) : 0.0);
+              "avg. rt time %.3f ms\n",
+              sp->fp_tx_frames, sp->fp_rx_frames, sp->fp_rx_errors, loss,
+              sp->fp_rx_times ?  sp->fp_transit_time_us * 1.0 /
+              (1000.0 * sp->fp_rx_times) : 0.0);
 }
 
 /*
@@ -665,29 +666,29 @@ fp_lookup_target()
                resp_len = sizeof(response);
                memset(&response, 0, sizeof(response));
                rc = fp_ns_get_id(FC_NS_GID_PN, fp_port_wwn,
-                               response, &resp_len);
+                                 response, &resp_len);
                if (rc == 0) {
                        fp_did = ((response[17] << 16) & 0xff0000) |
-                                ((response[18] << 8) & 0x00ff00) |
-                                (response[19] & 0x0000ff);
+                               ((response[18] << 8) & 0x00ff00) |
+                               (response[19] & 0x0000ff);
                        return 0;
                }
                SA_LOG("cannot find fcid of destination @ wwpn 0x%llX",
-                       fp_port_wwn);
+                      fp_port_wwn);
        }
        if (fp_node_wwn != 0) {
                resp_len = sizeof(response);
                memset(&response, 0, sizeof(response));
                rc = fp_ns_get_id(FC_NS_GID_NN, fp_node_wwn,
-                               response, &resp_len);
+                                 response, &resp_len);
                if (rc == 0) {
                        fp_did = ((response[17] << 16) & 0xff0000) |
-                                ((response[18] << 8) & 0x00ff00) |
-                                (response[19] & 0x0000ff);
+                               ((response[18] << 8) & 0x00ff00) |
+                               (response[19] & 0x0000ff);
                        return 0;
                }
                SA_LOG("cannot find fcid of destination @ wwnn 0x%llX",
-                       fp_node_wwn);
+                      fp_node_wwn);
        }
        return 1;
 }
@@ -750,7 +751,7 @@ fp_get_time_usec(void)
 
 static int
 send_els_echo(int fp_fd, void *fp_buf, uint32_t fp_len,
-               unsigned char *resp, uint32_t *resp_len, fc_fid_t fp_did)
+             unsigned char *resp, uint32_t *resp_len, fc_fid_t fp_did)
 {
        struct fc_bsg_request cdb;
        char sense[MAX_SENSE_LEN];
@@ -815,31 +816,31 @@ static int fp_send_ping(void)
        if (rc) {
                sp->fp_rx_errors++;
                printf("echo %4d error: %s\n",
-                       sp->fp_tx_frames, strerror(errno));
+                      sp->fp_tx_frames, strerror(errno));
        } else {
                usec = fp_get_time_usec();
                sp->fp_rx_frames++;
                ep = (struct fcping_echo *) resp;
                if (usec < tx_time) {
                        snprintf(time_msg, sizeof(time_msg),
-                               "time unknown now %llx old %llx",
-                               usec, tx_time);
+                                "time unknown now %llx old %llx",
+                                usec, tx_time);
                        usec = 0;       /* as if time went backwards */
                } else {
                        usec = usec - tx_time;
                        snprintf(time_msg, sizeof(time_msg),
-                               "%6.3f ms", usec / 1000.0);
+                                "%6.3f ms", usec / 1000.0);
                        sp->fp_transit_time_us += usec;
                        sp->fp_rx_times++;
                }
                if (ep->fe_op == ELS_LS_ACC) {
                        if (memcmp((char *) ep + 1,
-                                       (char *) fp_buf + 1, fp_len - 1) == 0)
+                                  (char *) fp_buf + 1, fp_len - 1) == 0)
                                snprintf(msg, sizeof(msg), "accepted");
                        else {
                                sp->fp_rx_errors++;
                                snprintf(msg, sizeof(msg),
-                                       "accept data mismatches");
+                                        "accept data mismatches");
                        }
                } else if (ep->fe_op == ELS_LS_RJT) {
                        sp->fp_rx_errors++;
@@ -847,11 +848,11 @@ static int fp_send_ping(void)
                } else {
                        sp->fp_rx_errors++;
                        snprintf(msg, sizeof(msg),
-                               "op %x received", ep->fe_op);
+                                "op %x received", ep->fe_op);
                }
                if (fp_quiet == 0)
                        printf("echo %4d %-30s %s\n",
-                               sp->fp_tx_frames, msg, time_msg);
+                              sp->fp_tx_frames, msg, time_msg);
        }
        if (fp_hex) {
                printf("response length %u\n", resp_len);
@@ -921,7 +922,7 @@ int main(int argc, char *argv[])
                fp_fd = open(bsg_dev, O_RDWR);
                if (fp_fd < 0)
                        SA_LOG_ERR_EXIT(errno,
-                               "open of %s failed", bsg_dev);
+                                       "open of %s failed", bsg_dev);
 
                if (!fp_lookup_target()) {
                        fp_buf_setup();
diff --git a/fcrls.c b/fcrls.c
index 64d0bc9..65dcf6b 100644
--- a/fcrls.c
+++ b/fcrls.c
@@ -177,16 +177,16 @@ static const char *lopt_usage[] = {
        NULL,
 };
 
-#define bsg_error(format...)           \
-({                                     \
-       fprintf(stderr, "ERROR: " format);      \
-})
+#define bsg_error(format...)                           \
+       ({                                              \
+               fprintf(stderr, "ERROR: " format);      \
+       })
 
-#define bsg_debug(format...)           \
-({                                     \
-       if (!quiet)                     \
-               printf("DEBUG: " format);               \
-})
+#define bsg_debug(format...)                           \
+       ({                                              \
+               if (!quiet)                             \
+                       printf("DEBUG: " format);       \
+       })
 
 static char *els_rjt2str(int type, int code)
 {
@@ -206,18 +206,18 @@ static char *els_rjt2str(int type, int code)
 static int els_print_lesb(struct fcoe_fc_els_lesb *lesb)
 {
        printf("RLS request accepted (LS_ACC), dumping status counters:\n"
-               "\tLink Failure Count                   = %u\n"
-               "\tVirtual Link Failure Count           = %u\n"
-               "\tMissed Discovery Advertisement Count = %u\n"
-               "\tSymbol Error During Carrier Count    = %u\n"
-               "\tErrored Block Count                  = %u\n"
-               "\tFrame Check Sequence Error Count     = %u\n",
-               ntohl(lesb->lesb_link_fail),
-               ntohl(lesb->lesb_vlink_fail),
-               ntohl(lesb->lesb_miss_fka),
-               ntohl(lesb->lesb_symb_err),
-               ntohl(lesb->lesb_err_block),
-               ntohl(lesb->lesb_fcs_error));
+              "\tLink Failure Count                   = %u\n"
+              "\tVirtual Link Failure Count           = %u\n"
+              "\tMissed Discovery Advertisement Count = %u\n"
+              "\tSymbol Error During Carrier Count    = %u\n"
+              "\tErrored Block Count                  = %u\n"
+              "\tFrame Check Sequence Error Count     = %u\n",
+              ntohl(lesb->lesb_link_fail),
+              ntohl(lesb->lesb_vlink_fail),
+              ntohl(lesb->lesb_miss_fka),
+              ntohl(lesb->lesb_symb_err),
+              ntohl(lesb->lesb_err_block),
+              ntohl(lesb->lesb_fcs_error));
 
        return 0;
 }
@@ -225,10 +225,10 @@ static int els_print_lesb(struct fcoe_fc_els_lesb *lesb)
 static int els_print_rjt(struct rls_rjt *rjt)
 {
        printf("RLS request rejected (LS_RJT), check reason code below:\n"
-               "\tReason Code  = 0x%02x, %s.\n"
-               "\tExplain Code = 0x%02x, %s.\n",
-               rjt->er_reason, els_rjt2str(0, rjt->er_reason),
-               rjt->er_explan, els_rjt2str(1, rjt->er_explan));
+              "\tReason Code  = 0x%02x, %s.\n"
+              "\tExplain Code = 0x%02x, %s.\n",
+              rjt->er_reason, els_rjt2str(0, rjt->er_reason),
+              rjt->er_explan, els_rjt2str(1, rjt->er_explan));
        if (rjt->er_reason == ELS_RJT_VENDOR)
                printf("\tVendor Code  = 0x%02x (check with your vendor).\n",
                       rjt->er_vendor);
@@ -265,7 +265,7 @@ static int bsg_rport_els(int bsg, u8 els_code, void *req, 
int req_len,
        memset(sense, 0, sizeof(sense));
        rc = ioctl(bsg, SG_IO, &sgio);
        bsg_debug("ioctl returned %d: bsg_reply result=%d\n",
-                rc, reply->result);
+                 rc, reply->result);
        return rc;
 }
 
@@ -302,7 +302,7 @@ static int rport_getid(struct rport_info *rpi)
        if (rpi->found)
                return 0;
        snprintf(rp_sysfs, sizeof(rp_sysfs), "%s/rport-%d:%d-%d/port_id",
-               SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number);
+                SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number);
        f = fopen(rp_sysfs, "ro");
        if (!f) {
                bsg_error("failed to fopen(%s)!\n", rp_sysfs);
@@ -354,7 +354,7 @@ static int rport_check_state(struct rport_info *rpi)
                return EINVAL;
 
        snprintf(rp_sysfs, sizeof(rp_sysfs), "%s/rport-%d:%d-%d/port_state",
-               SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number);
+                SYSFS_FC_RPORTS, rpi->host_no, rpi->channel, rpi->number);
 
        f = fopen(rp_sysfs, "ro");
        if (!f) {
@@ -368,7 +368,7 @@ static int rport_check_state(struct rport_info *rpi)
        }
        if (strncmp(rp_state, RPORT_ONLINE, strlen(RPORT_ONLINE))) {
                bsg_error("rport 0x%x %s:must be %s\n", rpi->port_id,
-                       rp_state, RPORT_ONLINE);
+                         rp_state, RPORT_ONLINE);
                fclose(f);
                return ENODEV;
        }
@@ -444,7 +444,8 @@ int main(int argc, char *argv[])
                case RLS_PORT:
                        if (rport_parse(optarg, &rpi)) {
                                bsg_error("%s format incorrect, must be:"
-                                       "rport-host:channel-number\n", optarg);
+                                         "rport-host:channel-number\n",
+                                         optarg);
                                bsg_usage(EINVAL);
                        }
                        rpi.found = true;
diff --git a/fipvlan.c b/fipvlan.c
index f802cd8..bcdd93c 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -187,12 +187,12 @@ struct fip_tlv_ptrs {
 
 #define SET_BIT(b, n)  ((b) |= (1 << (n)))
 
-#define TLV_LEN_CHECK(t, l) ({ \
-       int _tlc = ((t)->tlv_len != (l)) ? 1 : 0; \
-       if (_tlc) \
+#define TLV_LEN_CHECK(t, l) ({                                         \
+       int _tlc = ((t)->tlv_len != (l)) ? 1 : 0;                       \
+       if (_tlc)                                                       \
                FIP_LOG("bad length for TLV of type %d", (t)->tlv_type); \
-       _tlc; \
-})
+       _tlc;                                                           \
+       })
 
 /**
  * fip_parse_tlvs - parse type/length/value encoded FIP descriptors
@@ -395,14 +395,14 @@ static const struct option long_options[] = {
 static void help(int status)
 {
        printf(
-"Usage: %s [ options ] [ network interfaces ]\n"
-"Options:\n"
-"  -a, --auto           Auto select Ethernet interfaces\n"
-"  -c, --create                Create system VLAN devices\n"
-"  -s, --start         Start FCoE login automatically\n"
-"  -h, --help           Display this help and exit\n"
-"  -v, --version        Display version information and exit\n",
-       exe);
+               "Usage: %s [ options ] [ network interfaces ]\n"
+               "Options:\n"
+               "  -a, --auto           Auto select Ethernet interfaces\n"
+               "  -c, --create         Create system VLAN devices\n"
+               "  -s, --start          Start FCoE login automatically\n"
+               "  -h, --help           Display this help and exit\n"
+               "  -v, --version        Display version information and exit\n",
+               exe);
 
        exit(status);
 }
@@ -434,7 +434,7 @@ void parse_cmdline(int argc, char **argv)
                        break;
                default:
                        fprintf(stderr, "Try '%s --help' "
-                                       "for more information\n", exe);
+                               "for more information\n", exe);
                        exit(1);
                }
        }
@@ -541,9 +541,9 @@ void print_results()
        TAILQ_FOREACH(fcf, &fcfs, list_node) {
                iff = lookup_iff(fcf->ifindex, NULL);
                printf("%-16.16s| %-5d| %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n",
-                       iff->ifname, fcf->vlan,
-                       fcf->mac_addr[0], fcf->mac_addr[1], fcf->mac_addr[2],
-                       fcf->mac_addr[3], fcf->mac_addr[4], fcf->mac_addr[5]);
+                      iff->ifname, fcf->vlan,
+                      fcf->mac_addr[0], fcf->mac_addr[1], fcf->mac_addr[2],
+                      fcf->mac_addr[3], fcf->mac_addr[4], fcf->mac_addr[5]);
        }
        printf("\n");
 }

_______________________________________________
devel mailing list
[email protected]
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to