scsi: qla2xxx: Insert spaces where required
authorBart Van Assche <bvanassche@acm.org>
Thu, 11 Apr 2019 21:53:19 +0000 (14:53 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Apr 2019 02:04:40 +0000 (22:04 -0400)
Improve source code readability by inserting spaces where these are
required according to the coding standard. This patch only inserts
whitespace and does not make any other changes.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_gs.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_sup.c
drivers/scsi/qla2xxx/qla_target.h

index fb4d844e64fab2a9f59b6bd94f309006031b89f0..8d560c562e9c06b5828b62d0c576f67ec978b20e 100644 (file)
@@ -888,7 +888,7 @@ do_read:
                count = 0;
        }
 
-       count = actual_size > count ? count: actual_size;
+       count = actual_size > count ? count : actual_size;
        memcpy(buf, ha->xgmac_data, count);
 
        return count;
@@ -2811,8 +2811,8 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
 
        /* initialized vport states */
        atomic_set(&vha->loop_state, LOOP_DOWN);
-       vha->vp_err_state VP_ERR_PORTDWN;
-       vha->vp_prev_err_state VP_ERR_UNKWN;
+       vha->vp_err_state = VP_ERR_PORTDWN;
+       vha->vp_prev_err_state = VP_ERR_UNKWN;
        /* Check if physical ha port is Up */
        if (atomic_read(&base_vha->loop_state) == LOOP_DOWN ||
            atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
index 94da4b9927e98b959bebdb22075ee0bf24fc7900..9e80646722e227c90dd47fbfcaff4184792586f4 100644 (file)
@@ -445,7 +445,7 @@ qla2xxx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint16_t *ram,
                }
        }
 
-       *nxt = rval == QLA_SUCCESS ? &ram[cnt]: NULL;
+       *nxt = rval == QLA_SUCCESS ? &ram[cnt] : NULL;
        return rval;
 }
 
index b8da57b862e4138da53e705510f40a7462e1b27f..4235769ec4ccf213ee77272005c8dda049420836 100644 (file)
@@ -2448,7 +2448,7 @@ qla2x00_fdmiv2_rpa(scsi_qla_host_t *vha)
        eiter->type = cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
        eiter->len = cpu_to_be16(4 + 4);
        eiter->a.max_frame_size = IS_FWI2_CAPABLE(ha) ?
-           le16_to_cpu(icb24->frame_payload_size):
+           le16_to_cpu(icb24->frame_payload_size) :
            le16_to_cpu(ha->init_cb->frame_payload_size);
        eiter->a.max_frame_size = cpu_to_be32(eiter->a.max_frame_size);
        size += 4 + 4;
index c05d507a3d64e2e7572fcf3bff7058c4ca813636..02b463c8f3eb05c24e9eaca9511901f030f42a45 100644 (file)
@@ -4711,7 +4711,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
                        ha->zio_mode = icb->add_firmware_options[0] &
                            (BIT_3 | BIT_2 | BIT_1 | BIT_0);
                        ha->zio_timer = icb->interrupt_delay_timer ?
-                           icb->interrupt_delay_timer: 2;
+                           icb->interrupt_delay_timer : 2;
                }
                icb->add_firmware_options[0] &=
                    ~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
@@ -4744,7 +4744,7 @@ qla2x00_rport_del(void *data)
        unsigned long flags;
 
        spin_lock_irqsave(fcport->vha->host->host_lock, flags);
-       rport = fcport->drport ? fcport->drport: fcport->rport;
+       rport = fcport->drport ? fcport->drport : fcport->rport;
        fcport->drport = NULL;
        spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
        if (rport) {
@@ -7208,11 +7208,11 @@ qla24xx_nvram_config(scsi_qla_host_t *vha)
        ha->flags.disable_risc_code_load = 0;
        ha->flags.enable_lip_reset = 0;
        ha->flags.enable_lip_full_login =
-           le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
+           le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
        ha->flags.enable_target_reset =
-           le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
+           le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
        ha->flags.enable_led_scheme = 0;
-       ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
+       ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
 
        ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) &
            (BIT_6 | BIT_5 | BIT_4)) >> 4;
@@ -7286,7 +7286,7 @@ qla24xx_nvram_config(scsi_qla_host_t *vha)
                ha->zio_mode = le32_to_cpu(icb->firmware_options_2) &
                    (BIT_3 | BIT_2 | BIT_1 | BIT_0);
                ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ?
-                   le16_to_cpu(icb->interrupt_delay_timer): 2;
+                   le16_to_cpu(icb->interrupt_delay_timer) : 2;
        }
        icb->firmware_options_2 &= cpu_to_le32(
            ~(BIT_3 | BIT_2 | BIT_1 | BIT_0));
@@ -8232,7 +8232,7 @@ qla84xx_init_chip(scsi_qla_host_t *vha)
 
        mutex_unlock(&ha->cs84xx->fw_update_mutex);
 
-       return rval != QLA_SUCCESS || status[0] ? QLA_FUNCTION_FAILED:
+       return rval != QLA_SUCCESS || status[0] ? QLA_FUNCTION_FAILED :
            QLA_SUCCESS;
 }
 
@@ -8428,11 +8428,11 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
        ha->flags.disable_risc_code_load = 0;
        ha->flags.enable_lip_reset = 0;
        ha->flags.enable_lip_full_login =
-           le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
+           le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
        ha->flags.enable_target_reset =
-           le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
+           le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
        ha->flags.enable_led_scheme = 0;
-       ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
+       ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
 
        ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) &
            (BIT_6 | BIT_5 | BIT_4)) >> 4;
@@ -8505,7 +8505,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
                ha->zio_mode = le32_to_cpu(icb->firmware_options_2) &
                    (BIT_3 | BIT_2 | BIT_1 | BIT_0);
                ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ?
-                   le16_to_cpu(icb->interrupt_delay_timer): 2;
+                   le16_to_cpu(icb->interrupt_delay_timer) : 2;
        }
        icb->firmware_options_2 &= cpu_to_le32(
            ~(BIT_3 | BIT_2 | BIT_1 | BIT_0));
index d233be241e5751af4f59fa7499b26fda74ea5d97..528dc71cb2750de4345a61e03407d4ab6a201adb 100644 (file)
@@ -2494,7 +2494,7 @@ qla2x00_logout_iocb(srb_t *sp, struct mbx_entry *mbx)
        SET_TARGET_ID(ha, mbx->loop_id, sp->fcport->loop_id);
        mbx->mb0 = cpu_to_le16(MBC_LOGOUT_FABRIC_PORT);
        mbx->mb1 = HAS_EXTENDED_IDS(ha) ?
-           cpu_to_le16(sp->fcport->loop_id):
+           cpu_to_le16(sp->fcport->loop_id) :
            cpu_to_le16(sp->fcport->loop_id << 8);
        mbx->mb2 = cpu_to_le16(sp->fcport->d_id.b.domain);
        mbx->mb3 = cpu_to_le16(sp->fcport->d_id.b.area << 8 |
index 01e51e2a7793a166aa8e82d9d37ee9a4804a73ab..682a2615731165b2f97406d3e92b2c08bfb1a5f4 100644 (file)
@@ -2033,7 +2033,7 @@ qla2x00_get_port_database(scsi_qla_host_t *vha, fc_port_t *fcport, uint8_t opt)
 
                /* Passback COS information. */
                fcport->supported_classes = (pd->options & BIT_4) ?
-                   FC_COS_CLASS2: FC_COS_CLASS3;
+                   FC_COS_CLASS2 : FC_COS_CLASS3;
        }
 
 gpd_error_out:
@@ -3277,7 +3277,7 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport,
 
        /* Issue marker IOCB. */
        rval2 = qla2x00_marker(vha, ha->base_qpair, fcport->loop_id, l,
-           type == TCF_LUN_RESET ? MK_SYNC_ID_LUN: MK_SYNC_ID);
+           type == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID);
        if (rval2 != QLA_SUCCESS) {
                ql_dbg(ql_dbg_mbx, vha, 0x1099,
                    "Failed to issue marker IOCB (%x).\n", rval2);
index 6c523e371dec4df03be985be3e97b6026a6eeec9..466aa35d10ccf3421aa95da6a0cacfccf0253284 100644 (file)
@@ -108,7 +108,7 @@ MODULE_PARM_DESC(ql2xshiftctondsd,
                "Set to control shifting of command type processing "
                "based on total number of SG elements.");
 
-int ql2xfdmienable=1;
+int ql2xfdmienable = 1;
 module_param(ql2xfdmienable, int, S_IRUGO|S_IWUSR);
 module_param_named(fdmi, ql2xfdmienable, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(ql2xfdmienable,
@@ -154,7 +154,7 @@ MODULE_PARM_DESC(ql2xenablehba_err_chk,
                "  1 -- Error isolation enabled only for DIX Type 0\n"
                "  2 -- Error isolation enabled for all Types\n");
 
-int ql2xiidmaenable=1;
+int ql2xiidmaenable = 1;
 module_param(ql2xiidmaenable, int, S_IRUGO);
 MODULE_PARM_DESC(ql2xiidmaenable,
                "Enables iIDMA settings "
index 320c25f3a79ab226a7b767d34509f16b26621d42..1eb82384d933ca62f302bfe843e6dd656e053c4a 100644 (file)
@@ -987,7 +987,7 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *vha)
                ha->fdt_unprotect_sec_cmd = flash_conf_addr(ha, 0x0300 |
                    fdt->unprotect_sec_cmd);
                ha->fdt_protect_sec_cmd = fdt->protect_sec_cmd ?
-                   flash_conf_addr(ha, 0x0300 | fdt->protect_sec_cmd):
+                   flash_conf_addr(ha, 0x0300 | fdt->protect_sec_cmd) :
                    flash_conf_addr(ha, 0x0336);
        }
        goto done;
index f3de75000a086c20eed2ff294518e62966864258..37e342f12787d0e6e923552699263575f507a237 100644 (file)
@@ -855,7 +855,7 @@ enum trace_flags {
        TRC_CTIO_ERR = BIT_11,
        TRC_CTIO_DONE = BIT_12,
        TRC_CTIO_ABORTED =  BIT_13,
-       TRC_CTIO_STRANGE= BIT_14,
+       TRC_CTIO_STRANGE = BIT_14,
        TRC_CMD_DONE = BIT_15,
        TRC_CMD_CHK_STOP = BIT_16,
        TRC_CMD_FREE = BIT_17,