From patchwork Thu Sep 28 02:17:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 145692 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3024529vqu; Wed, 27 Sep 2023 19:18:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5RO6tscz9bYYoHSrDZgjX4kG1qGs74jQIyEyc2bQ2SqxOA4JdRagWvLailYFVFyQ2EFuI X-Received: by 2002:a05:6a20:9147:b0:160:c1b9:a759 with SMTP id x7-20020a056a20914700b00160c1b9a759mr4195752pzc.20.1695867529104; Wed, 27 Sep 2023 19:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695867529; cv=none; d=google.com; s=arc-20160816; b=pVI83X2mqwAGfIyQ+94lhje3t5grYkJ80hnodB+gzV5Pgt/l4w7PIp9cr75sTU6/+W w4cdyLQC28QR6J4YIOGbkneNWUXeVrcnFDaEbE9lVNcYaaW9bUXPXzmZ3Aci123mfDO+ 7FO6SSGDFjUtY9CLIqKRoc+vUwinoQ7MqfbfFk1rAtKS3mIS2Sj1h5XzuoaeHBqbBjjl 3bDmlEhpQQLPFEZKyRrmOksjrqvxHWPEqpCj+kQ4XA0Y9wXWl1UzTcZdNmW5e5MQrrKf fRDz92pHkCuIcCP5doMz2K8pCDC0pVHh7jYfzcYm0KTBq+G2pKvJ98inDdobOC3OEYsw ItWA== 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=4TkJZSPghFOc6ck0Aky2rma4Zp/JPboMhTT3p4vgXMA=; fh=7XxrSkeWz746vvy4RO2T3/Acu1znasH/bthfsQTCQZk=; b=hFgNSgFfQ/1yf7XhcaPblkiGXnzkS3zVgEE9m2grJZ+NWANSaQP6HAdpAghZqcnejT dVyxFggRKtF84XIbm54BctIB4akEdEScWkS+wBABk5eA3FTMx+eMyCDFw/HT1V63HeIf 0Y8DPeM78sEEda98tNzhpnQsHF1ZxK7DVrj5f4veN7TKTrbr3RE9iwmmqNkWJLbKkLnw 3jZpKjMfp7mbQtIIhSymDAARN87i2HIZwH95DXz+gY8BP40Dt6RqAX/I49wA7ZAANUYU m84PPgpSdi2xERGAT5JNiquZRGc8eqr02KO5IHwvVK6lS1nwfLOMoZ9BTF+fNjF48dqt 8h3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j21-20020a170902c3d500b001c72c893ac9si2177493plj.104.2023.09.27.19.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:18:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id CF4F08083E6E; Wed, 27 Sep 2023 19:18:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbjI1CSa (ORCPT + 20 others); Wed, 27 Sep 2023 22:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI1CS3 (ORCPT ); Wed, 27 Sep 2023 22:18:29 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A213EB3; Wed, 27 Sep 2023 19:18:27 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 10:17:08 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 10:17:08 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: lpfc: Clean up errors in lpfc_sli.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: <28c39c5b.8a1.18ad9935f63.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDXaD4k4hRliXq+AA--.584W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQAbsj 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 19:18:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778245990049965062 X-GMAIL-MSGID: 1778245990049965062 Fix the following errors reported by checkpatch: ERROR: "foo * bar" should be "foo *bar" ERROR: space required before the open parenthesis '(' ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) ERROR: "foo * bar" should be "foo *bar" ERROR: space prohibited after that '&' (ctx:WxW) Signed-off-by: KaiLong Wang --- drivers/scsi/lpfc/lpfc_sli.c | 44 ++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 4dfadf254a72..68c922551fc8 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -916,7 +916,7 @@ struct lpfc_iocbq * __lpfc_sli_get_iocbq(struct lpfc_hba *phba) { struct list_head *lpfc_iocb_list = &phba->lpfc_iocb_list; - struct lpfc_iocbq * iocbq = NULL; + struct lpfc_iocbq *iocbq = NULL; lockdep_assert_held(&phba->hbalock); @@ -1341,7 +1341,7 @@ __lpfc_sli_get_nvmet_sglq(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq) struct lpfc_iocbq * lpfc_sli_get_iocbq(struct lpfc_hba *phba) { - struct lpfc_iocbq * iocbq = NULL; + struct lpfc_iocbq *iocbq = NULL; unsigned long iflags; spin_lock_irqsave(&phba->hbalock, iflags); @@ -2118,7 +2118,7 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq) spin_lock_irq(&phba->hbalock); iotag = psli->last_iotag; - if(++iotag < psli->iocbq_lookup_len) { + if (++iotag < psli->iocbq_lookup_len) { psli->last_iotag = iotag; psli->iocbq_lookup[iotag] = iocbq; spin_unlock_irq(&phba->hbalock); @@ -2137,7 +2137,7 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq) /* highly unprobable case */ kfree(new_arr); iotag = psli->last_iotag; - if(++iotag < psli->iocbq_lookup_len) { + if (++iotag < psli->iocbq_lookup_len) { psli->last_iotag = iotag; psli->iocbq_lookup[iotag] = iocbq; spin_unlock_irq(&phba->hbalock); @@ -3078,8 +3078,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) (uint32_t)pmbox->mbxCommand, pmbox->un.varWords[0], pmbox->un.varWords[1]); - } - else { + } else { lpfc_debugfs_disc_trc(phba->pport, LPFC_DISC_TRC_MBOX, "MBOX cmpl: cmd:x%x mb:x%x x%x", @@ -3163,7 +3162,7 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) pmbox->un.varWords[10]); if (pmb->mbox_cmpl) - pmb->mbox_cmpl(phba,pmb); + pmb->mbox_cmpl(phba, pmb); } while (1); return 0; } @@ -3449,8 +3448,8 @@ static int lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, struct lpfc_iocbq *saveq) { - IOCB_t * irsp; - WORD5 * w5p; + IOCB_t *irsp; + WORD5 *w5p; dma_addr_t paddr; uint32_t Rctl, Type; struct lpfc_iocbq *iocbq; @@ -9362,7 +9361,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, if (pmbox->mbox_cmpl && pmbox->mbox_cmpl != lpfc_sli_def_mbox_cmpl && pmbox->mbox_cmpl != lpfc_sli_wake_mbox_wait) { - if(!pmbox->vport) { + if (!pmbox->vport) { spin_unlock_irqrestore(&phba->hbalock, drvr_flag); lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_VPORT, @@ -9469,8 +9468,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, "MBOX Bsy vport: cmd:x%x mb:x%x x%x", (uint32_t)mbx->mbxCommand, mbx->un.varWords[0], mbx->un.varWords[1]); - } - else { + } else { lpfc_debugfs_disc_trc(phba->pport, LPFC_DISC_TRC_MBOX, "MBOX Bsy: cmd:x%x mb:x%x x%x", @@ -9520,8 +9518,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, "MBOX Send vport: cmd:x%x mb:x%x x%x", (uint32_t)mbx->mbxCommand, mbx->un.varWords[0], mbx->un.varWords[1]); - } - else { + } else { lpfc_debugfs_disc_trc(phba->pport, LPFC_DISC_TRC_MBOX, "MBOX Send: cmd:x%x mb:x%x x%x", @@ -9660,7 +9657,7 @@ lpfc_sli_issue_mbox_s3(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t slimword0; /* Check real SLIM for any errors */ slimword0 = readl(phba->MBslimaddr); - slimmb = (MAILBOX_t *) & slimword0; + slimmb = (MAILBOX_t *) &slimword0; if (((slimword0 & OWN_CHIP) != OWN_CHIP) && slimmb->mbxStatus) { psli->sli_flag &= @@ -10382,7 +10379,7 @@ static struct lpfc_iocbq * lpfc_sli_next_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, struct lpfc_iocbq **piocb) { - struct lpfc_iocbq * nextiocb; + struct lpfc_iocbq *nextiocb; lockdep_assert_held(&phba->hbalock); @@ -10685,8 +10682,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, } else if (piocb->cmd_flag & LPFC_IO_FCP) { /* These IO's already have an XRI and a mapped sgl. */ sglq = NULL; - } - else { + } else { /* * This is a continuation of a commandi,(CX) so this * sglq is on the active list @@ -11328,7 +11324,7 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, * This function is called with no lock held. SLI3 only. **/ static int -lpfc_extra_ring_setup( struct lpfc_hba *phba) +lpfc_extra_ring_setup(struct lpfc_hba *phba) { struct lpfc_sli *psli; struct lpfc_sli_ring *pring; @@ -11493,8 +11489,8 @@ lpfc_sli4_abts_err_handler(struct lpfc_hba *phba, * event message and posts events for the management applications. **/ static void -lpfc_sli_async_event_handler(struct lpfc_hba * phba, - struct lpfc_sli_ring * pring, struct lpfc_iocbq * iocbq) +lpfc_sli_async_event_handler(struct lpfc_hba *phba, + struct lpfc_sli_ring *pring, struct lpfc_iocbq *iocbq) { IOCB_t *icmd; uint16_t evt_code; @@ -13711,8 +13707,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) writel(control, phba->HCregaddr); readl(phba->HCregaddr); /* flush */ spin_unlock_irqrestore(&phba->hbalock, iflag); - } - else + } else work_ha_copy &= ~HA_LATT; } @@ -13746,8 +13741,7 @@ lpfc_sli_sp_intr_handler(int irq, void *dev_id) ~(HC_R0INT_ENA << LPFC_ELS_RING); writel(control, phba->HCregaddr); readl(phba->HCregaddr); /* flush */ - } - else { + } else { lpfc_debugfs_slow_ring_trc(phba, "ISR slow ring: pwork:" "x%x hawork:x%x wait:x%x",