From c8d8d7fbbe45f2be3fa9f932d20726fd0c5eb8d9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 11 Mar 2019 03:47:48 +0000 Subject: [PATCH] isert-scst: Fix several checkpatch warnings This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8047 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_buf.c | 4 ++-- iscsi-scst/kernel/isert-scst/iser_datamover.c | 3 ++- iscsi-scst/kernel/isert-scst/iser_pdu.c | 9 +++++--- iscsi-scst/kernel/isert-scst/iser_rdma.c | 23 +++++++++++-------- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/iscsi-scst/kernel/isert-scst/iser_buf.c b/iscsi-scst/kernel/isert-scst/iser_buf.c index e2f5e4e66..acbdee403 100644 --- a/iscsi-scst/kernel/isert-scst/iser_buf.c +++ b/iscsi-scst/kernel/isert-scst/iser_buf.c @@ -320,8 +320,8 @@ void isert_wr_release(struct isert_wr *wr) if (isert_buf->sg_cnt) { ib_dev = isert_dev->ib_dev; - ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, - isert_buf->dma_dir); + ib_dma_unmap_sg(ib_dev, isert_buf->sg, + isert_buf->sg_cnt, isert_buf->dma_dir); } isert_buf_release(isert_buf); } diff --git a/iscsi-scst/kernel/isert-scst/iser_datamover.c b/iscsi-scst/kernel/isert-scst/iser_datamover.c index eca083529..42dd2c0b5 100644 --- a/iscsi-scst/kernel/isert-scst/iser_datamover.c +++ b/iscsi-scst/kernel/isert-scst/iser_datamover.c @@ -197,7 +197,8 @@ int isert_login_rsp_tx(struct iscsi_cmnd *login_rsp, int last, int discovery) &isert_conn->login_req_pdu->wr[0], 1); if (unlikely(err)) { - PRINT_ERROR("Failed to post recv login req rx buf, err:%d", err); + PRINT_ERROR("Failed to post recv login req rx buf, err:%d", + err); return err; } } diff --git a/iscsi-scst/kernel/isert-scst/iser_pdu.c b/iscsi-scst/kernel/isert-scst/iser_pdu.c index 2187baa13..da2c1e0bb 100644 --- a/iscsi-scst/kernel/isert-scst/iser_pdu.c +++ b/iscsi-scst/kernel/isert-scst/iser_pdu.c @@ -255,7 +255,8 @@ int isert_prepare_rdma(struct isert_cmnd *isert_pdu, isert_buf->dma_dir = DMA_FROM_DEVICE; if (unlikely(isert_buf->sg_cnt > isert_pdu->n_sge)) { - wr_cnt = isert_alloc_for_rdma(isert_pdu, isert_buf->sg_cnt, isert_conn); + wr_cnt = isert_alloc_for_rdma(isert_pdu, isert_buf->sg_cnt, + isert_conn); if (unlikely(wr_cnt)) goto out; } @@ -271,7 +272,8 @@ int isert_prepare_rdma(struct isert_cmnd *isert_pdu, buff_offset = 0; sg_cnt = 0; - for (wr_cnt = 0, sg_offset = 0; sg_offset < isert_buf->sg_cnt; ++wr_cnt) { + for (wr_cnt = 0, sg_offset = 0; sg_offset < isert_buf->sg_cnt; + ++wr_cnt) { sg_cnt = min((int)isert_conn->max_sge, isert_buf->sg_cnt - sg_offset); err = isert_wr_init(&isert_pdu->wr[wr_cnt], op, isert_buf, @@ -438,7 +440,8 @@ static inline void isert_link_recv_pdu_wrs(struct isert_cmnd *from_pdu, int isert_alloc_conn_resources(struct isert_connection *isert_conn) { struct isert_cmnd *pdu, *prev_pdu = NULL, *first_pdu = NULL; - int t_datasz = 512; /* RFC states that minimum receive data size is 512 */ + /* RFC states that minimum receive data size is 512 */ + int t_datasz = 512; int i_datasz = ISER_HDRS_SZ + SCST_SENSE_BUFFERSIZE; int i, err = 0; int to_alloc; diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 6180ce669..abeee79c2 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -164,7 +164,8 @@ static void isert_post_drain_sq(struct isert_connection *isert_conn) &drain_wr_sq->send_wr.wr, &bad_wr); #endif if (unlikely(err)) { - PRINT_ERROR("Failed to post drain wr to send queue, err:%d", err); + PRINT_ERROR("Failed to post drain wr to send queue, err:%d", + err); /* * We need to decrement iser_conn->kref in order to be able to * clean up the connection. @@ -622,7 +623,8 @@ static void isert_conn_drained_do_work(struct work_struct *work) static void isert_sched_conn_drained(struct isert_connection *isert_conn) { #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) - INIT_WORK(&isert_conn->drain_work, isert_conn_drained_do_work, isert_conn); + INIT_WORK(&isert_conn->drain_work, isert_conn_drained_do_work, + isert_conn); #else INIT_WORK(&isert_conn->drain_work, isert_conn_drained_do_work); #endif @@ -724,8 +726,8 @@ static void isert_handle_wc_error(struct ib_wc *wc) break; case ISER_WR_RDMA_READ: if (isert_buf->sg_cnt != 0) { - ib_dma_unmap_sg(ib_dev, isert_buf->sg, isert_buf->sg_cnt, - isert_buf->dma_dir); + ib_dma_unmap_sg(ib_dev, isert_buf->sg, + isert_buf->sg_cnt, isert_buf->dma_dir); isert_buf->sg_cnt = 0; } if (!isert_pdu->is_fake_rx) @@ -785,7 +787,8 @@ static int isert_poll_cq(struct isert_cq *cq) } /* callback function for isert_dev->[cq]->cq_comp_work */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) && \ + !defined(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19) /* A vanilla 2.6.19 or older kernel without backported OFED kernel headers. */ static void isert_cq_comp_work_cb(void *ctx) { @@ -1263,7 +1266,7 @@ fail_create_qp: } static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id, - struct isert_device *isert_dev) + struct isert_device *isert_dev) { struct isert_connection *isert_conn; int err; @@ -1526,8 +1529,8 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id, NIPQUAD(((struct sockaddr_in *)&isert_conn->peer_addr)->sin_addr.s_addr), NIPQUAD(((struct sockaddr_in *)&isert_conn->self_addr)->sin_addr.s_addr)); #else - PRINT_INFO("iser accepted connection cm_id:%p " - "%pI4->%pI4", cm_id, + PRINT_INFO("iser accepted connection cm_id:%p %pI4->%pI4", + cm_id, &((struct sockaddr_in *)&isert_conn->peer_addr)->sin_addr.s_addr, &((struct sockaddr_in *)&isert_conn->self_addr)->sin_addr.s_addr); #endif @@ -1539,8 +1542,8 @@ static int isert_cm_conn_req_handler(struct rdma_cm_id *cm_id, NIP6(((struct sockaddr_in6 *)&isert_conn->peer_addr)->sin6_addr), NIP6(((struct sockaddr_in6 *)&isert_conn->self_addr)->sin6_addr)); #else - PRINT_INFO("iser accepted connection cm_id:%p " - "%pI6->%pI6", cm_id, + PRINT_INFO("iser accepted connection cm_id:%p %pI6->%pI6", + cm_id, &((struct sockaddr_in6 *)&isert_conn->peer_addr)->sin6_addr, &((struct sockaddr_in6 *)&isert_conn->self_addr)->sin6_addr); #endif