From patchwork Thu Sep 28 01:38:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 145673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3011474vqu; Wed, 27 Sep 2023 18:40:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHn9CdB2AQXV3psySPpSVwIT9VDC2/R4/hJAcwFZyU11opU/YM7jyYDyn5jBmdJ0e3nthMT X-Received: by 2002:a05:6808:92:b0:3a7:73e0:d18f with SMTP id s18-20020a056808009200b003a773e0d18fmr4048431oic.14.1695865209244; Wed, 27 Sep 2023 18:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695865209; cv=none; d=google.com; s=arc-20160816; b=rnMSEltrjZhRF8VcvZ2lqbOI3x1C1QxI1+hI7md+CuymdHt5soJufK2nSJQZrG3swQ kGwFPn8KdoEVBpYf9d1RlDWCsQN5fXrikaRC7OsAFVMUv4+cpTsE4o7qpNM7kDLvd9We 7NBQ2q/nZfrHkex4wb9UPSiE6bRAWPmsFT467y3vgKUHVbPKxBRdjLbJQCMKunNKg6l7 tQiw4MqfURqlW1dswCymN6nKlXwQlPnowUR6mLBz6bRapZfrat8HIiVdz/UAYMz+IkWY kwJ/yDMgfHh4zKzZDDdeOJM4mVzBsJuWqy9tau/US2ESHUh51JkaPzJg4XGVF+CRmyDC VVQA== 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=CzOpndpz8Os6EwikxqNeSaRqS4IY2g7dkCq8T2JMdQI=; fh=EJlDgVKPCsYupPYC/ATB3Ui30GnM0yNDqQLKpeBwW8Y=; b=FldO26Ao9gZO9Z1tw1kdAB16lgEbT8kkpRKSeHWVoaLuqIzch28cDvKbc4a8nC7avj 6CB8J1YNuptYLhFEV/cAZIFGOrHpSyPLlYAE8YR+gfiTeQJYfRn7S2Qi/RpDW0VqhV87 1p2sWpLiBaEXB464bvLmbLWCiGoB0ug/nTmJ2+Sf/j4Jzp9ITr8MXrUh+IghI94Bt/Wm qOuyjfP9oMZcpBWADETR2YZNCVYYDXruu95wswMuB33r9OSlww+yEsc8GC2IMk4N3rES +gw8KSSml6snGjxFnNwS5YQS2Kedtsfd2K+2TDO2eVf9gc0RfkHGcrfVSHCwfkZJRoux qTtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t5-20020a628105000000b00690158064aasi16596362pfd.118.2023.09.27.18.40.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 18:40:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 67B338220D4C; Wed, 27 Sep 2023 18:39:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbjI1Bjd (ORCPT + 20 others); Wed, 27 Sep 2023 21:39:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjI1Bjb (ORCPT ); Wed, 27 Sep 2023 21:39:31 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D33E8B3; Wed, 27 Sep 2023 18:39:29 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 09:38:09 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 09:38:09 +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: <79a31286.896.18ad96fae37.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4B2RRlinW+AA--.579W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQALsz X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 27 Sep 2023 18:39:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778243557252568124 X-GMAIL-MSGID: 1778243557252568124 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: GuoHua Cheng --- 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,