From patchwork Thu Sep 28 02:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 145682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3019992vqu; Wed, 27 Sep 2023 19:05:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmnmiozhiwElVAJC4s7WHo33PDOvfNlxa4e0Rkb4Zs14TLI6aozDxOknicbUFpPt92esHh X-Received: by 2002:a05:6a21:3d8b:b0:15d:ccf3:939c with SMTP id bj11-20020a056a213d8b00b0015dccf3939cmr4041529pzc.35.1695866739838; Wed, 27 Sep 2023 19:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695866739; cv=none; d=google.com; s=arc-20160816; b=ucl4bJD9zUBS0nsnedqGCZCgDUNsQxwPIXrw4tX+R0Lc94IQr3bTkI/TkDw8An4N2a 2dLPtZ5a0KjmYpCvgUfwhtdCW5X7ZUtWMvPx9WSzTtFUn5OM5xkhYODGfSuu0gbPUEdw HvQIwoj59Ie4RMvz2ccyA7u1P99LL1CS1GFXgFInZjQa/1QPGMHgpqLUGv0Fw1JdlrvT F247WcR+2FiEUIT8FREhu0IH67f01JUkC7KjZbdfNDmdxRuACe0XRay2IVrwr3KSb0WA 4GLFpqVf+UnwaAm3xNlh/azEm1yex52axeDLmu6Zkiy04aD+9gjQAD4BM+PLdZTO0JAf iMWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=OcuSL4XZwKHb6rOjnIPgMgs+B4osJ1scjItwktGSdD4=; fh=EJlDgVKPCsYupPYC/ATB3Ui30GnM0yNDqQLKpeBwW8Y=; b=FRXrYylGlM8gAZL5/RGrbx1v4iH9Qf+EZGCe4+ahZfP9R0YvytALR3Pb51hKyuW3B7 eSM0q7/MjLDXdKSuOygUveYRfPpBR4Xdo7qVPw4gBq+6+a5WaiP86duY3L2FIgxJhKO4 Mr+vLj6n7NWZa6BqlwcEAS8FB+yQ8GbHVdIuLCsDoULRBLkGRJhGEp8tROngtMUNO6u7 MABkqUCSv0PjfA1de5xIgKjdq6BVzzHGZ9vNOQVxBusEHvlZAVxTCBs+ePIjm3CjFStm ZwcMNq4PqY8cCxY+uw9ra+9qDuvk7Bg8848sgzUBReF5KKGUume5Jvq0ugoqWG2Fy/xC Q/ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q1-20020a170902dac100b001c20db25108si11717313plx.41.2023.09.27.19.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:05:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 45DCE81444FF; Wed, 27 Sep 2023 19:01:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbjI1CBZ (ORCPT + 20 others); Wed, 27 Sep 2023 22:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI1CBY (ORCPT ); Wed, 27 Sep 2023 22:01:24 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3D4EB3; Wed, 27 Sep 2023 19:01:22 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 10:00:02 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 10:00:02 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: linux@highpoint-tech.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: hptiop: Clean up errors in hptiop.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: <34fa1c8d.89c.18ad983b6a3.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4i3hRla3i+AA--.581W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQAWsu X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_PBL,RDNS_NONE,T_SPF_HELO_PERMERROR,T_SPF_PERMERROR,XPRIO autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 19:01:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778243557252568124 X-GMAIL-MSGID: 1778245162583682263 Fix the following errors reported by checkpatch: ERROR: "foo * bar" should be "foo *bar" ERROR: else should follow close brace '}' ERROR: spaces required around that '?' (ctx:VxW) ERROR: need consistent spacing around '&' (ctx:VxW) Signed-off-by: KaiLong Wang --- drivers/scsi/hptiop.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index f5334ccbf2ca..57f28f5b5da1 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -93,7 +93,7 @@ static void hptiop_drain_outbound_queue_itl(struct hptiop_hba *hba) if (req & IOPMU_QUEUE_MASK_HOST_BITS) hptiop_request_callback_itl(hba, req); else { - struct hpt_iop_request_header __iomem * p; + struct hpt_iop_request_header __iomem *p; p = (struct hpt_iop_request_header __iomem *) ((char __iomem *)hba->u.itl.iop + req); @@ -103,8 +103,7 @@ static void hptiop_drain_outbound_queue_itl(struct hptiop_hba *hba) hptiop_request_callback_itl(hba, req); else writel(1, &p->context); - } - else + } else hptiop_request_callback_itl(hba, req); } } @@ -394,7 +393,7 @@ static int iop_send_sync_msg(struct hptiop_hba *hba, u32 msg, u32 millisec) } hba->ops->enable_intr(hba); - return hba->msg_done? 0 : -1; + return hba->msg_done ? 0 : -1; } static int iop_get_config_itl(struct hptiop_hba *hba, @@ -688,8 +687,7 @@ static void hptiop_message_callback(struct hptiop_hba *hba, u32 msg) if (msg == IOPMU_INBOUND_MSG0_RESET) { atomic_set(&hba->resetting, 0); wake_up(&hba->reset_wq); - } - else if (msg <= IOPMU_INBOUND_MSG0_MAX) + } else if (msg <= IOPMU_INBOUND_MSG0_MAX) hba->msg_done = 1; } @@ -817,13 +815,12 @@ static void hptiop_iop_request_callback_itl(struct hptiop_hba *hba, u32 tag) if (arg->outbuf_size) memcpy_fromio(arg->outbuf, - &p->buf[(readl(&p->inbuf_size) + 3)& ~3], + &p->buf[(readl(&p->inbuf_size) + 3) & ~3], arg->outbuf_size); if (arg->bytes_returned) *arg->bytes_returned = arg->outbuf_size; - } - else + } else arg->result = HPT_IOCTL_RESULT_FAILED; arg->done(arg); @@ -1090,12 +1087,12 @@ static int hptiop_reset_hba(struct hptiop_hba *hba) static int hptiop_reset(struct scsi_cmnd *scp) { - struct hptiop_hba * hba = (struct hptiop_hba *)scp->device->host->hostdata; + struct hptiop_hba *hba = (struct hptiop_hba *)scp->device->host->hostdata; printk(KERN_WARNING "hptiop_reset(%d/%d/%d)\n", scp->device->host->host_no, -1, -1); - return hptiop_reset_hba(hba)? FAILED : SUCCESS; + return hptiop_reset_hba(hba) ? FAILED : SUCCESS; } static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev,