From patchwork Wed Sep 27 08:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenguohua@jari.cn X-Patchwork-Id: 727006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBEBDE810A4 for ; Wed, 27 Sep 2023 08:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230453AbjI0Idx (ORCPT ); Wed, 27 Sep 2023 04:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjI0IdU (ORCPT ); Wed, 27 Sep 2023 04:33:20 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DF61D10D9; Wed, 27 Sep 2023 01:32:58 -0700 (PDT) Received: from chenguohua$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Wed, 27 Sep 2023 16:31:34 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Wed, 27 Sep 2023 16:31:34 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: chenguohua@jari.cn To: lduncan@suse.com, cleech@redhat.com, michael.christie@oracle.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: iscsi: Clean up errors in libiscsi_tcp.c X-Priority: 3 X-Mailer: Coremail Webmail Server Version 2023.1-cmXT6 build 20230419(ff23bf83) Copyright (c) 2002-2023 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <7db9a4b1.889.18ad5c3d0ef.Coremail.chenguohua@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD5m6BNlifm9AA--.577W X-CM-SenderInfo: xfkh0w5xrk3tw6md2xgofq/1tbiAQAHEWUSpy8AOwAisx X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following errors reported by checkpatch: ERROR: "(foo*)" should be "(foo *)" ERROR: space required before the open parenthesis '(' ERROR: space required before the open brace '{' Signed-off-by: GuoHua Cheng --- drivers/scsi/libiscsi_tcp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index c182aa83f2c9..11b9cd41fc1f 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c @@ -462,16 +462,16 @@ void iscsi_tcp_cleanup_task(struct iscsi_task *task) spin_lock_bh(&tcp_task->queue2pool); /* flush task's r2t queues */ - while (kfifo_out(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*))) { - kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, - sizeof(void*)); + while (kfifo_out(&tcp_task->r2tqueue, (void *)&r2t, sizeof(void *))) { + kfifo_in(&tcp_task->r2tpool.queue, (void *)&r2t, + sizeof(void *)); ISCSI_DBG_TCP(task->conn, "pending r2t dropped\n"); } r2t = tcp_task->r2t; if (r2t != NULL) { - kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, - sizeof(void*)); + kfifo_in(&tcp_task->r2tpool.queue, (void *)&r2t, + sizeof(void *)); tcp_task->r2t = NULL; } spin_unlock_bh(&tcp_task->queue2pool); @@ -496,7 +496,7 @@ static int iscsi_tcp_data_in(struct iscsi_conn *conn, struct iscsi_task *task) * is status. */ if (!(rhdr->flags & ISCSI_FLAG_DATA_STATUS)) - iscsi_update_cmdsn(conn->session, (struct iscsi_nopin*)rhdr); + iscsi_update_cmdsn(conn->session, (struct iscsi_nopin *)rhdr); if (tcp_conn->in.datalen == 0) return 0; @@ -580,7 +580,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr) tcp_task = task->dd_data; r2tsn = be32_to_cpu(rhdr->r2tsn); - if (tcp_task->exp_datasn != r2tsn){ + if (tcp_task->exp_datasn != r2tsn) { ISCSI_DBG_TCP(conn, "task->exp_datasn(%d) != rhdr->r2tsn(%d)\n", tcp_task->exp_datasn, r2tsn); rc = ISCSI_ERR_R2TSN; @@ -638,7 +638,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr) r2t->sent = 0; tcp_task->exp_datasn = r2tsn + 1; - kfifo_in(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*)); + kfifo_in(&tcp_task->r2tqueue, (void *)&r2t, sizeof(void *)); conn->r2t_pdus_cnt++; spin_unlock(&tcp_task->pool2queue); @@ -715,7 +715,7 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn *conn, struct iscsi_hdr *hdr) ISCSI_DBG_TCP(conn, "opcode 0x%x ahslen %d datalen %d\n", opcode, ahslen, tcp_conn->in.datalen); - switch(opcode) { + switch (opcode) { case ISCSI_OP_SCSI_DATA_IN: spin_lock(&conn->session->back_lock); task = iscsi_itt_to_ctask(conn, hdr->itt); @@ -1178,7 +1178,7 @@ int iscsi_tcp_r2tpool_alloc(struct iscsi_session *session) /* R2T xmit queue */ if (kfifo_alloc(&tcp_task->r2tqueue, - session->max_r2t * 4 * sizeof(void*), GFP_KERNEL)) { + session->max_r2t * 4 * sizeof(void *), GFP_KERNEL)) { iscsi_pool_free(&tcp_task->r2tpool); goto r2t_alloc_fail; }