scsi: lpfc: Fix various trivial errors in comments and log messages
authorJames Smart <jsmart2021@gmail.com>
Mon, 12 Apr 2021 01:31:23 +0000 (18:31 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Apr 2021 05:39:14 +0000 (01:39 -0400)
Clean up minor issues spotted by tools and code review:

 - Spelling Errors

 - Spurious characters and errors in function headers

 - nvme_info wqerr and err fields source data reversed

 - Extraneous new line in log message 0466

 - Spacing error in log message 0109

 - Messages 0140 and 0141 have portname and nodename reversed

 - Incorrect function labelling in comment

Link: https://lore.kernel.org/r/20210412013127.2387-13-jsmart2021@gmail.com
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_nportdisc.c
drivers/scsi/lpfc/lpfc_sli.c

index 8d50a391058f57f59ab7d1f4b796351a1efa0e4f..5bb8a7c1b6ec3321f02b3603aaf538bf129096a9 100644 (file)
@@ -487,8 +487,8 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
                  atomic_read(&lport->xmt_fcp_noxri),
                  atomic_read(&lport->xmt_fcp_bad_ndlp),
                  atomic_read(&lport->xmt_fcp_qdepth),
-                 atomic_read(&lport->xmt_fcp_err),
-                 atomic_read(&lport->xmt_fcp_wqerr));
+                 atomic_read(&lport->xmt_fcp_wqerr),
+                 atomic_read(&lport->xmt_fcp_err));
        if (strlcat(buf, tmp, PAGE_SIZE) >= PAGE_SIZE)
                goto buffer_done;
 
@@ -1174,8 +1174,7 @@ lpfc_emptyq_wait(struct lpfc_hba *phba, struct list_head *q, spinlock_t *lock)
                msleep(20);
                if (cnt++ > 250) {  /* 5 secs */
                        lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
-                                       "0466 %s %s\n",
-                                       "Outstanding IO when ",
+                                       "0466 Outstanding IO when "
                                        "bringing Adapter offline\n");
                                return 0;
                }
@@ -5927,7 +5926,7 @@ LPFC_ATTR_RW(XLanePriority, 0, 0x0, 0x7f, "CS_CTL for Express Lane Feature.");
 LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support");
 
 /*
-# lpfc_prot_mask: i
+# lpfc_prot_mask:
 #      - Bit mask of host protection capabilities used to register with the
 #        SCSI mid-layer
 #      - Only meaningful if BG is turned on (lpfc_enable_bg=1).
@@ -5952,7 +5951,7 @@ LPFC_ATTR(prot_mask,
        "T10-DIF host protection capabilities mask");
 
 /*
-# lpfc_prot_guard: i
+# lpfc_prot_guard:
 #      - Bit mask of protection guard types to register with the SCSI mid-layer
 #      - Guard types are currently either 1) T10-DIF CRC 2) IP checksum
 #      - Allows you to ultimately specify which profiles to use
index 48a6b0cc58efccc693ae43005ef25c49a3baff57..32e562f27e8fa036e92d891fa8e356377a4b57b9 100644 (file)
@@ -3878,7 +3878,7 @@ lpfc_bsg_sli_cfg_dma_desc_setup(struct lpfc_hba *phba, enum nemb_type nemb_tp,
  * @dmabuf: Pointer to a DMA buffer descriptor.
  *
  * This routine performs SLI_CONFIG (0x9B) read mailbox command operation with
- * non-embedded external bufffers.
+ * non-embedded external buffers.
  **/
 static int
 lpfc_bsg_sli_cfg_read_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
@@ -4067,7 +4067,7 @@ job_error:
  * @dmabuf: Pointer to a DMA buffer descriptor.
  *
  * This routine performs SLI_CONFIG (0x9B) write mailbox command operation with
- * non-embedded external bufffers.
+ * non-embedded external buffers.
  **/
 static int
 lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
@@ -4211,7 +4211,7 @@ lpfc_bsg_sli_cfg_write_cmd_ext(struct lpfc_hba *phba, struct bsg_job *job,
                goto job_error;
        }
 
-       /* wait for additoinal external buffers */
+       /* wait for additional external buffers */
 
        bsg_reply->result = 0;
        bsg_job_done(job, bsg_reply->result,
@@ -4233,8 +4233,8 @@ job_error:
  * @dmabuf: Pointer to a DMA buffer descriptor.
  *
  * This routine handles SLI_CONFIG (0x9B) mailbox command with non-embedded
- * external bufffers, including both 0x9B with non-embedded MSEs and 0x9B
- * with embedded sussystem 0x1 and opcodes with external HBDs.
+ * external buffers, including both 0x9B with non-embedded MSEs and 0x9B
+ * with embedded subsystem 0x1 and opcodes with external HBDs.
  **/
 static int
 lpfc_bsg_handle_sli_cfg_mbox(struct lpfc_hba *phba, struct bsg_job *job,
@@ -4559,7 +4559,7 @@ lpfc_bsg_write_ebuf_set(struct lpfc_hba *phba, struct bsg_job *job,
                goto job_error;
        }
 
-       /* wait for additoinal external buffers */
+       /* wait for additional external buffers */
        bsg_reply->result = 0;
        bsg_job_done(job, bsg_reply->result,
                       bsg_reply->reply_payload_rcv_len);
@@ -4625,7 +4625,7 @@ lpfc_bsg_handle_sli_cfg_ebuf(struct lpfc_hba *phba, struct bsg_job *job,
  * @job: Pointer to the job object.
  * @dmabuf: Pointer to a DMA buffer descriptor.
  *
- * This routine checkes and handles non-embedded multi-buffer SLI_CONFIG
+ * This routine checks and handles non-embedded multi-buffer SLI_CONFIG
  * (0x9B) mailbox commands and external buffers.
  **/
 static int
@@ -4703,7 +4703,7 @@ sli_cfg_ext_error:
  * from the mailbox pool, copy the caller mailbox command.
  *
  * If offline and the sli is active we need to poll for the command (port is
- * being reset) and com-plete the job, otherwise issue the mailbox command and
+ * being reset) and complete the job, otherwise issue the mailbox command and
  * let our completion handler finish the command.
  **/
 static int
index c919bedd931c96c3d8a621bc1bcff4c853edeefe..21108f322c9958c968f864bf5ecf50ca52e74e35 100644 (file)
@@ -4378,7 +4378,7 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
                irsp->ulpStatus, irsp->un.ulpWord[4], ndlp->nlp_DID);
        /* ACC to LOGO completes to NPort <nlp_DID> */
        lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
-                        "0109 ACC to LOGO completes to NPort x%x refcnt %d"
+                        "0109 ACC to LOGO completes to NPort x%x refcnt %d "
                         "Data: x%x x%x x%x\n",
                         ndlp->nlp_DID, kref_read(&ndlp->kref), ndlp->nlp_flag,
                         ndlp->nlp_state, ndlp->nlp_rpi);
@@ -4783,7 +4783,7 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
 }
 
 /**
- * lpfc_els_rsp_reject - Propare and issue a rjt response iocb command
+ * lpfc_els_rsp_reject - Prepare and issue a rjt response iocb command
  * @vport: pointer to a virtual N_Port data structure.
  * @rejectError: reject response to issue
  * @oldiocb: pointer to the original lpfc command iocb data structure.
index fd3d0197d15558c3c1195a4d4d54b3c3260b82e1..bb4e65a32ecc6526b07a7e359b43e9f0dfa460ee 100644 (file)
@@ -340,7 +340,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
        sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t));
        if (wwn_to_u64(sp->portName.u.wwn) == 0) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
-                                "0140 PLOGI Reject: invalid nname\n");
+                                "0140 PLOGI Reject: invalid pname\n");
                stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
                stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_PNAME;
                lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp,
@@ -349,7 +349,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
        }
        if (wwn_to_u64(sp->nodeName.u.wwn) == 0) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
-                                "0141 PLOGI Reject: invalid pname\n");
+                                "0141 PLOGI Reject: invalid nname\n");
                stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
                stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_NNAME;
                lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp,
index 3b48e3e88e67c173a46bbaef4c0576e6f12b47e5..11145a78dbe9dc79df68fb8117870dd1aae8e4f1 100644 (file)
@@ -935,7 +935,7 @@ __lpfc_sli_get_iocbq(struct lpfc_hba *phba)
  * @phba: Pointer to HBA context object.
  * @xritag: XRI value.
  *
- * This function clears the sglq pointer from the array of acive
+ * This function clears the sglq pointer from the array of active
  * sglq's. The xritag that is passed in is used to index into the
  * array. Before the xritag can be used it needs to be adjusted
  * by subtracting the xribase.
@@ -957,7 +957,7 @@ __lpfc_clear_active_sglq(struct lpfc_hba *phba, uint16_t xritag)
  * @phba: Pointer to HBA context object.
  * @xritag: XRI value.
  *
- * This function returns the sglq pointer from the array of acive
+ * This function returns the sglq pointer from the array of active
  * sglq's. The xritag that is passed in is used to index into the
  * array. Before the xritag can be used it needs to be adjusted
  * by subtracting the xribase.
@@ -14851,7 +14851,7 @@ lpfc_sli4_hba_intr_handler(int irq, void *dev_id)
        }
 
        return IRQ_HANDLED;
-} /* lpfc_sli4_fp_intr_handler */
+} /* lpfc_sli4_hba_intr_handler */
 
 /**
  * lpfc_sli4_intr_handler - Device-level interrupt handler for SLI-4 device
@@ -18106,7 +18106,7 @@ lpfc_sli4_xri_inrange(struct lpfc_hba *phba,
 
 /**
  * lpfc_sli4_seq_abort_rsp - bls rsp to sequence abort
- * @vport: pointer to a vitural port.
+ * @vport: pointer to a virtual port.
  * @fc_hdr: pointer to a FC frame header.
  * @aborted: was the partially assembled receive sequence successfully aborted
  *