Re: [PATCH] qedi: Fix misleading indentation

2018-06-26 Thread Martin K. Petersen


Bart,

> This patch avoids that smatch reports the following warnings:
>
> drivers/scsi/qedi/qedi_fw_api.c:129: init_sqe() warn: inconsistent indenting
> drivers/scsi/qedi/qedi_fw_api.c:137: init_sqe() warn: inconsistent indenting

Applied to 4.19/scsi-queue, thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [PATCH] qedi: Fix misleading indentation

2018-06-26 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn 
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


[PATCH] qedi: Fix misleading indentation

2018-06-25 Thread Bart Van Assche
This patch avoids that smatch reports the following warnings:

drivers/scsi/qedi/qedi_fw_api.c:129: init_sqe() warn: inconsistent indenting
drivers/scsi/qedi/qedi_fw_api.c:137: init_sqe() warn: inconsistent indenting

Signed-off-by: Bart Van Assche 
Cc: qlogic-storage-upstr...@cavium.com
---
 drivers/scsi/qedi/qedi_fw_api.c | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/qedi/qedi_fw_api.c b/drivers/scsi/qedi/qedi_fw_api.c
index a269da1a6c75..387dc87e4d22 100644
--- a/drivers/scsi/qedi/qedi_fw_api.c
+++ b/drivers/scsi/qedi/qedi_fw_api.c
@@ -126,22 +126,24 @@ static void init_sqe(struct iscsi_task_params 
*task_params,
 sgl_task_params,
 dif_task_params);
 
-   if (scsi_is_slow_sgl(sgl_task_params->num_sges,
-sgl_task_params->small_mid_sge))
-   num_sges = ISCSI_WQE_NUM_SGES_SLOWIO;
-   else
-   num_sges = min(sgl_task_params->num_sges,
-  (u16)SCSI_NUM_SGES_SLOW_SGL_THR);
-   }
+   if (scsi_is_slow_sgl(sgl_task_params->num_sges,
+sgl_task_params->small_mid_sge))
+   num_sges = ISCSI_WQE_NUM_SGES_SLOWIO;
+   else
+   num_sges = min(sgl_task_params->num_sges,
+  (u16)SCSI_NUM_SGES_SLOW_SGL_THR);
+   }
 
-   SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES, num_sges);
-   SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN,
- buf_size);
+   SET_FIELD(task_params->sqe->flags, ISCSI_WQE_NUM_SGES,
+ num_sges);
+   SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CONT_LEN,
+ buf_size);
 
-   if (GET_FIELD(pdu_header->hdr_second_dword,
- ISCSI_CMD_HDR_TOTAL_AHS_LEN))
-   SET_FIELD(task_params->sqe->contlen_cdbsize, ISCSI_WQE_CDB_SIZE,
- cmd_params->extended_cdb_sge.sge_len);
+   if (GET_FIELD(pdu_header->hdr_second_dword,
+ ISCSI_CMD_HDR_TOTAL_AHS_LEN))
+   SET_FIELD(task_params->sqe->contlen_cdbsize,
+ ISCSI_WQE_CDB_SIZE,
+ cmd_params->extended_cdb_sge.sge_len);
}
break;
case ISCSI_TASK_TYPE_INITIATOR_READ:
-- 
2.17.1