From nobody Tue Dec 16 16:23:04 2025 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 9A760E80A8A for ; Thu, 28 Sep 2023 02:01:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbjI1CB0 (ORCPT ); Wed, 27 Sep 2023 22:01:26 -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 Content-Transfer-Encoding: quoted-printable 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-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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; =20 p =3D (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 hpti= op_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, u3= 2 msg, u32 millisec) } =20 hba->ops->enable_intr(hba); - return hba->msg_done? 0 : -1; + return hba->msg_done ? 0 : -1; } =20 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 =3D=3D IOPMU_INBOUND_MSG0_RESET) { atomic_set(&hba->resetting, 0); wake_up(&hba->reset_wq); - } - else if (msg <=3D IOPMU_INBOUND_MSG0_MAX) + } else if (msg <=3D IOPMU_INBOUND_MSG0_MAX) hba->msg_done =3D 1; } =20 @@ -817,13 +815,12 @@ static void hptiop_iop_request_callback_itl(struct hp= tiop_hba *hba, u32 tag) =20 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); =20 if (arg->bytes_returned) *arg->bytes_returned =3D arg->outbuf_size; - } - else + } else arg->result =3D HPT_IOCTL_RESULT_FAILED; =20 arg->done(arg); @@ -1090,12 +1087,12 @@ static int hptiop_reset_hba(struct hptiop_hba *hba) =20 static int hptiop_reset(struct scsi_cmnd *scp) { - struct hptiop_hba * hba =3D (struct hptiop_hba *)scp->device->host->hostd= ata; + struct hptiop_hba *hba =3D (struct hptiop_hba *)scp->device->host->hostda= ta; =20 printk(KERN_WARNING "hptiop_reset(%d/%d/%d)\n", scp->device->host->host_no, -1, -1); =20 - return hptiop_reset_hba(hba)? FAILED : SUCCESS; + return hptiop_reset_hba(hba) ? FAILED : SUCCESS; } =20 static int hptiop_adjust_disk_queue_depth(struct scsi_device *sdev, --=20 2.17.1