mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "KaiLong Wang" <wangkailong@jari.cn>
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
Date: Thu, 28 Sep 2023 10:28:29 +0800 (GMT+08:00)	[thread overview]
Message-ID: <3ee2affd.8a2.18ad99dc0ef.Coremail.wangkailong@jari.cn> (raw)

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 <wangkailong@jari.cn>
---
 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;
 
-- 
2.17.1

             reply	other threads:[~2023-09-28  2:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28  2:28 KaiLong Wang [this message]
2023-09-28 16:25 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ee2affd.8a2.18ad99dc0ef.Coremail.wangkailong@jari.cn \
    --to=wangkailong@jari.cn \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®