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: 727548 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 CBA8BE810D5 for ; Thu, 28 Sep 2023 02:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229959AbjI1CBZ (ORCPT ); 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= Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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,