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: 145696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3028751vqu; Wed, 27 Sep 2023 19:32:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTojNIepG3bhObf9KHbpKhQnDYtnXf7Ig6gVkhT/t0je7bF+PVDygs7w/A1u0M91bRgjsG X-Received: by 2002:a05:6a20:3ca3:b0:128:ffb7:dcfe with SMTP id b35-20020a056a203ca300b00128ffb7dcfemr6758249pzj.1.1695868334153; Wed, 27 Sep 2023 19:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695868334; cv=none; d=google.com; s=arc-20160816; b=ExlaHdjVXu2KcCnmf657E8kegJPBLqdL9Cf14P3ysLhCFFT/0aFpja10nikHhn6yHL /s+DwAm6PtR0tPFKfDkKld821WRDZyj0j7cigyMNdLgfQYaXV0zNcAL9HdGuTv32fm+B srg5BQzX9r6F+bfsJ9enMs1KYPucF7fVR/0pdm9DrfO35HB9cRx3ABsIOFxHe6+KGVKh FscsxXyQbBSYIOorkHRfSfTDQbvfodNjdjlsZsQSVIH2JtpYRvOKXHqhGs3ffxiMATRf irug17eoDcgrp3ayf+GvxNGz97jHFiIkmM+dnfLiSOqq5KQPhzk9S2AJGm9/zB6oWfTe StDw== 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=r0t9aU598AlTaW8dCtFU/I7R28sZCtQHsDAZhhCJt1w=; fh=7XxrSkeWz746vvy4RO2T3/Acu1znasH/bthfsQTCQZk=; b=iboW5lADPWCfMP7kxAIk9s15J3a98lmvl5wwaxESe7K+a8RNzqIk7FTJ0JVC02jmuf ClHv1HPvOswG2fg61wCr+xdqPv+HJV5LA6VFXFb8sM2SJAc6vFR/AOy5NwMD0r2LsiZZ qbNPytWezS2Bc6lPppf48uvKwxG5BOj+LNxcCVdaXH459Owf4iW6TT7O+Zq24kP5bZHf DW1kuMuFjPyfE+AbjtOJu/27NztGPAaqthHHQXM0K4br0mqOxukl3354J1bG7/p8yK0c rfuCAIBDstWXgg9jXJWtAwyse1xzrUkZ0c21YsTC6vBTThG1rOfGoZ9Fp70OwQvX2C6b X/6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x5-20020a654145000000b00584ac935a98si6368370pgp.828.2023.09.27.19.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 19:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id BDB7F807C85E; Wed, 27 Sep 2023 19:30:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbjI1C3v (ORCPT + 20 others); 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= 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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 27 Sep 2023 19:30:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778246834455606248 X-GMAIL-MSGID: 1778246834455606248 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;