From patchwork Thu Sep 28 02:28:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 13401894 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 2EF7FE810DF for ; Thu, 28 Sep 2023 02:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjI1C3v (ORCPT ); Wed, 27 Sep 2023 22:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjI1C3u (ORCPT ); Wed, 27 Sep 2023 22:29:50 -0400 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 782C2102; Wed, 27 Sep 2023 19:29:48 -0700 (PDT) Received: from wangkailong$jari.cn ( [182.148.12.64] ) by ajax-webmail-localhost.localdomain (Coremail) ; Thu, 28 Sep 2023 10:28:29 +0800 (GMT+08:00) X-Originating-IP: [182.148.12.64] Date: Thu, 28 Sep 2023 10:28:29 +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_init.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: <3ee2affd.8a2.18ad99dc0ef.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwDnhD_N5BRlPny+AA--.596W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQAJB2T8PZMAAQAesm X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VW3Jw 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: space required after that ',' (ctx:VxV) ERROR: space prohibited before that '++' ERROR: space prohibited after that open parenthesis '(' ERROR: "(foo*)" should be "(foo *)" Signed-off-by: KaiLong Wang --- drivers/scsi/lpfc/lpfc_init.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 9e59c050103d..74dec0a179ea 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -149,9 +149,9 @@ lpfc_config_port_prep(struct lpfc_hba *phba) } lpfc_read_nv(phba, pmb); - memset((char*)mb->un.varRDnvp.rsvd3, 0, + memset((char *)mb->un.varRDnvp.rsvd3, 0, sizeof (mb->un.varRDnvp.rsvd3)); - memcpy((char*)mb->un.varRDnvp.rsvd3, licensed, + memcpy((char *)mb->un.varRDnvp.rsvd3, licensed, sizeof (licensed)); rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); @@ -185,7 +185,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) "0439 Adapter failed to init, mbxCmd x%x " "READ_REV, mbxStatus x%x\n", mb->mbxCommand, mb->mbxStatus); - mempool_free( pmb, phba->mbox_mem_pool); + mempool_free(pmb, phba->mbox_mem_pool); return -ERESTART; } @@ -212,7 +212,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) vp->rev.rBit = 1; memcpy(&vp->sli3Feat, &mb->un.varRdRev.sli3Feat, sizeof(uint32_t)); vp->rev.sli1FwRev = mb->un.varRdRev.sli1FwRev; - memcpy(vp->rev.sli1FwName, (char*) mb->un.varRdRev.sli1FwName, 16); + memcpy(vp->rev.sli1FwName, (char *) mb->un.varRdRev.sli1FwName, 16); vp->rev.sli2FwRev = mb->un.varRdRev.sli2FwRev; memcpy(vp->rev.sli2FwName, (char *) mb->un.varRdRev.sli2FwName, 16); vp->rev.biuRev = mb->un.varRdRev.biuRev; @@ -285,7 +285,7 @@ lpfc_config_port_prep(struct lpfc_hba *phba) * set internal async event support flag to 0. **/ static void -lpfc_config_async_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) +lpfc_config_async_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq) { if (pmboxq->u.mb.mbxStatus == MBX_SUCCESS) phba->temp_sensor_support = 1; @@ -510,7 +510,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) "READ_CONFIG, mbxStatus x%x\n", mb->mbxCommand, mb->mbxStatus); phba->link_state = LPFC_HBA_ERROR; - mempool_free( pmb, phba->mbox_mem_pool); + mempool_free(pmb, phba->mbox_mem_pool); return -EIO; } @@ -1258,7 +1258,7 @@ lpfc_rrq_timeout(struct timer_list *t) * heart-beat outstanding state set, the driver will put the HBA offline. **/ static void -lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) +lpfc_hb_mbox_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmboxq) { unsigned long drvr_flag; @@ -2414,7 +2414,7 @@ lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len) finished = 1; break; default: - index ++; + index++; break; } } @@ -2754,7 +2754,7 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp) } if (mdp && mdp[0] == '\0') - snprintf(mdp, 79,"%s", m.name); + snprintf(mdp, 79, "%s", m.name); /* * oneConnect hba requires special processing, they are all initiators * and we put the port number on the end @@ -2902,7 +2902,7 @@ lpfc_post_rcv_buf(struct lpfc_hba *phba) return 0; } -#define S(N,V) (((V)<<(N))|((V)>>(32-(N)))) +#define S(N, V) (((V)<<(N))|((V)>>(32-(N)))) /** * lpfc_sha_init - Set up initial array of hash table entries @@ -2912,7 +2912,7 @@ lpfc_post_rcv_buf(struct lpfc_hba *phba) * for the LC HBAs. **/ static void -lpfc_sha_init(uint32_t * HashResultPointer) +lpfc_sha_init(uint32_t *HashResultPointer) { HashResultPointer[0] = 0x67452301; HashResultPointer[1] = 0xEFCDAB89; @@ -2932,7 +2932,7 @@ lpfc_sha_init(uint32_t * HashResultPointer) * the @HashResultPointer as the result hash table. **/ static void -lpfc_sha_iterate(uint32_t * HashResultPointer, uint32_t * HashWorkingPointer) +lpfc_sha_iterate(uint32_t *HashResultPointer, uint32_t *HashWorkingPointer) { int t; uint32_t TEMP; @@ -2989,7 +2989,7 @@ lpfc_sha_iterate(uint32_t * HashResultPointer, uint32_t * HashWorkingPointer) * array and returned by reference through @HashWorking. **/ static void -lpfc_challenge_key(uint32_t * RandomChallenge, uint32_t * HashWorking) +lpfc_challenge_key(uint32_t *RandomChallenge, uint32_t *HashWorking) { *HashWorking = (*RandomChallenge ^ *HashWorking); } @@ -3776,7 +3776,7 @@ lpfc_online(struct lpfc_hba *phba) * set to unblock the management interface afterwards. **/ void -lpfc_unblock_mgmt_io(struct lpfc_hba * phba) +lpfc_unblock_mgmt_io(struct lpfc_hba *phba) { unsigned long iflag;