Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461057 > unrolled thread

[PATCH 2/2] be2iscsi: Fix some error messages

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2016-08-12 12:10 +0200
Last post2016-08-17 06:00 +0200
Articles 20 on this page of 21 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 2/2] be2iscsi: Fix some error messages Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-12 12:10 +0200
    Re: [PATCH 2/2] be2iscsi: Fix some error messages Julia Lawall <julia.lawall@lip6.fr> - 2016-08-12 12:40 +0200
      Re: [PATCH 2/2] be2iscsi: Fix some error messages Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-12 22:40 +0200
        [PATCH 2/2 v2] be2iscsi: Fix some error messages Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-13 09:20 +0200
          Re: [PATCH 2/2 v2] be2iscsi: Fix some error messages Julia Lawall <julia.lawall@lip6.fr> - 2016-08-13 09:20 +0200
        [PATCH 2/2 v3] be2iscsi: Fix some error messages Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-13 09:30 +0200
          Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages Joe Perches <joe@perches.com> - 2016-08-13 13:40 +0200
            Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-13 14:40 +0200
              Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages Joe Perches <joe@perches.com> - 2016-08-13 18:50 +0200
                Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages Joe Perches <joe@perches.com> - 2016-08-13 19:10 +0200
                  [PATCH 1/2] be2iscsi: Coalesce split strings and formats Joe Perches <joe@perches.com> - 2016-08-14 10:40 +0200
                  [PATCH 0/2] be2iscsi: Logging neatening Joe Perches <joe@perches.com> - 2016-08-14 10:40 +0200
                    Re: [PATCH 0/2] be2iscsi: Logging neatening Bart Van Assche <Bart.VanAssche@sandisk.com> - 2016-08-14 16:40 +0200
                      Re: [PATCH 0/2] be2iscsi: Logging neatening Joe Perches <joe@perches.com> - 2016-08-14 18:30 +0200
                        Re: [PATCH 0/2] be2iscsi: Logging neatening Bart Van Assche <Bart.VanAssche@sandisk.com> - 2016-08-14 19:30 +0200
                          Re: [PATCH 0/2] be2iscsi: Logging neatening Joe Perches <joe@perches.com> - 2016-08-14 19:40 +0200
                            Re: [PATCH 0/2] be2iscsi: Logging neatening Bart Van Assche <Bart.VanAssche@sandisk.com> - 2016-08-17 04:00 +0200
                              Re: [PATCH 0/2] be2iscsi: Logging neatening Joe Perches <joe@perches.com> - 2016-08-17 05:40 +0200
                        Re: [PATCH] be2iscsi: Use a more current logging style Joe Perches <joe@perches.com> - 2016-08-16 12:30 +0200
                          RE: [PATCH] be2iscsi: Use a more current logging style Jitendra Bhivare <jitendra.bhivare@broadcom.com> - 2016-08-17 06:00 +0200
                            Re: [PATCH] be2iscsi: Use a more current logging style Joe Perches <joe@perches.com> - 2016-08-17 06:00 +0200

Page 1 of 2  [1] 2  Next page →


#1461057 — [PATCH 2/2] be2iscsi: Fix some error messages

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-08-12 12:10 +0200
Subject[PATCH 2/2] be2iscsi: Fix some error messages
Message-ID<s5hzA-if-9@gated-at.bofh.it>
This fixes:
   - missing spaces in string split on several lines
   - extra spaces after ':'
   - missing '\n' at the end of some messages
   - too long lines

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/be2iscsi/be_main.c | 83 +++++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 40 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 89ae6390b697..415c21ec6a13 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1168,7 +1168,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1256,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1293,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1303,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1604,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2210,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2243,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3305,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3315,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3371,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3432,7 +3433,8 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
 					      BEISCSI_DEFQ_HDR, ulp_num);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : be_cmd_create_default_pdu_queue Failed DEFHDR on ULP : %d\n",
+			    "BM_%d : be_cmd_create_default_pdu_queue Failed "
+			    "DEFHDR on ULP : %d\n",
 			    ulp_num);
 
 		return ret;
@@ -3499,7 +3501,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3529,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3696,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +4001,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4015,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4084,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4127,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4155,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4214,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4228,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4259,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4399,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4420,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4511,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4752,7 +4754,8 @@ beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p free_index=0x%x wrb_handles_available=%d\n",
+		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p "
+		    "free_index=0x%x wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
 }
@@ -4806,7 +4809,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4820,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4836,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4854,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4875,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4888,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5487,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state == pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5580,8 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - "
+			    "Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[toc] | [next] | [standalone]


#1461072

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-08-12 12:40 +0200
Message-ID<s5i2C-s6-15@gated-at.bofh.it>
In reply to#1461057

[Multipart message — attachments visible in raw view] — view raw

On Fri, 12 Aug 2016, Christophe JAILLET wrote:

> This fixes:
>    - missing spaces in string split on several lines
>    - extra spaces after ':'
>    - missing '\n' at the end of some messages
>    - too long lines

I think that the strings should be concatenated, even if they go past 80
chars.  I'm surprised checkpatch didn't complain.

julia

>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/scsi/be2iscsi/be_main.c | 83 +++++++++++++++++++++--------------------
>  1 file changed, 43 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 89ae6390b697..415c21ec6a13 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>  				&nonemb_cmd.dma);
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "mgmt_invalidate_icds\n");
>  		return FAILED;
>  	}
> @@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>  				   cid, &nonemb_cmd);
>  	if (!tag) {
>  		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
> -			    "BM_%d : mgmt_invalidate_icds could not be"
> +			    "BM_%d : mgmt_invalidate_icds could not be "
>  			    "submitted\n");
>  		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
>  				    nonemb_cmd.va, nonemb_cmd.dma);
> @@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
>  				&nonemb_cmd.dma);
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "mgmt_invalidate_icds\n");
>  		return FAILED;
>  	}
> @@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
>  					  &phwi_context->be_eq[i]);
>  			if (ret) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : beiscsi_init_irqs-Failed to"
> +					    "BM_%d : beiscsi_init_irqs-Failed to "
>  					    "register msix for i = %d\n",
>  					    i);
>  				kfree(phba->msi_name[i]);
> @@ -1168,7 +1168,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  		 * failed in xmit_task or alloc_pdu.
>  		 */
>  		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
> -			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
> +			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
>  			     "value there=%p\n", phba->io_sgl_free_index,
>  			     phba->io_sgl_hndl_base
>  			     [phba->io_sgl_free_index]);
> @@ -1256,7 +1256,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
>  			       phba->params.wrbs_per_cxn);
>  	beiscsi_log(phba, KERN_INFO,
>  		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
> +		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
>  		    "wrb_handles_available=%d\n",
>  		    pwrb_handle, pwrb_context->free_index,
>  		    pwrb_context->wrb_handles_available);
> @@ -1293,7 +1293,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  {
>  	spin_lock_bh(&phba->mgmt_sgl_lock);
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
> -		    "BM_%d : In  free_mgmt_sgl_handle,"
> +		    "BM_%d : In  free_mgmt_sgl_handle, "
>  		    "eh_sgl_free_index=%d\n",
>  		    phba->eh_sgl_free_index);
>
> @@ -1303,7 +1303,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  		 * failed in xmit_task or alloc_pdu.
>  		 */
>  		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
> -			    "BM_%d : Double Free in eh SGL ,"
> +			    "BM_%d : Double Free in eh SGL, "
>  			    "eh_sgl_free_index=%d\n",
>  			    phba->eh_sgl_free_index);
>  		spin_unlock_bh(&phba->mgmt_sgl_lock);
> @@ -1604,7 +1604,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
>  	default:
>  		beiscsi_log(phba, KERN_WARNING,
>  			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
> -			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
> +			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
>  			    "wrb_index 0x%x CID 0x%x\n", type,
>  			    csol_cqe.wrb_index,
>  			    csol_cqe.cid);
> @@ -2210,7 +2210,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
>  		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
> +				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
>  				    cqe_desc[code], code, cid);
>  			spin_lock_bh(&phba->async_pdu_lock);
>  			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
> @@ -2243,7 +2243,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
>  		default:
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Invalid CQE Event Received Code : %d"
> +				    "BM_%d : Invalid CQE Event Received Code : %d "
>  				    "CID 0x%x...\n",
>  				    code, cid);
>  			break;
> @@ -3305,7 +3305,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
>  					    phwi_context->cur_eqd);
>  		if (ret) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : beiscsi_cmd_eq_create"
> +				    "BM_%d : beiscsi_cmd_eq_create "
>  				    "Failed for EQ\n");
>  			goto create_eq_error;
>  		}
> @@ -3315,6 +3315,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
>  			    phwi_context->be_eq[i].q.id);
>  	}
>  	return 0;
> +
>  create_eq_error:
>  	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
>  		eq = &phwi_context->be_eq[i].q;
> @@ -3370,7 +3371,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
>  					    false, 0);
>  		if (ret) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : beiscsi_cmd_eq_create"
> +				    "BM_%d : beiscsi_cmd_eq_create "
>  				    "Failed for ISCSI CQ\n");
>  			goto create_cq_error;
>  		}
> @@ -3432,7 +3433,8 @@ beiscsi_create_def_hdr(struct beiscsi_hba *phba,
>  					      BEISCSI_DEFQ_HDR, ulp_num);
>  	if (ret) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : be_cmd_create_default_pdu_queue Failed DEFHDR on ULP : %d\n",
> +			    "BM_%d : be_cmd_create_default_pdu_queue Failed "
> +			    "DEFHDR on ULP : %d\n",
>  			    ulp_num);
>
>  		return ret;
> @@ -3499,7 +3501,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
>
>  	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : DEFAULT PDU DATA RING CREATED"
> +		    "BM_%d : DEFAULT PDU DATA RING CREATED "
>  		    "on ULP : %d\n", ulp_num);
>
>  	return 0;
> @@ -3527,13 +3529,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
>
>  			if (status != 0) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Post Template HDR Failed for"
> +					    "BM_%d : Post Template HDR Failed for "
>  					    "ULP_%d\n", ulp_num);
>  				return status;
>  			}
>
>  			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -				    "BM_%d : Template HDR Pages Posted for"
> +				    "BM_%d : Template HDR Pages Posted for "
>  				    "ULP_%d\n", ulp_num);
>  		}
>  	}
> @@ -3694,7 +3696,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
>  					    ulp_base_num);
>  		if (status != 0) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : wrbq create failed.");
> +				    "BM_%d : wrbq create failed.\n");
>  			kfree(pwrb_arr);
>  			return status;
>  		}
> @@ -3999,7 +4001,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
>
>  error:
>  	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -		    "BM_%d : hwi_init_port failed");
> +		    "BM_%d : hwi_init_port failed\n");
>  	hwi_cleanup(phba);
>  	return status;
>  }
> @@ -4013,7 +4015,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
>  		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
>  		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
>  		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
> +			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
>  			    phwi_ctrlr->phwi_ctxt);
>  	} else {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> @@ -4082,7 +4084,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
>  	if (ret)
>  		goto free_init;
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : Return success from beiscsi_init_controller");
> +		    "BM_%d : Return success from beiscsi_init_controller\n");
>
>  	return 0;
>
> @@ -4125,7 +4127,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
>  		}
>  	} else {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : HWI_MEM_SGLH is more than one element."
> +			    "BM_%d : HWI_MEM_SGLH is more than one element. "
>  			    "Failing to load\n");
>  		return -ENOMEM;
>  	}
> @@ -4153,7 +4155,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
>  		idx++;
>  	}
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
> +		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
>  		    "phba->eh_sgl_hndl_avbl=%d\n",
>  		    phba->io_sgl_hndl_avbl,
>  		    phba->eh_sgl_hndl_avbl);
> @@ -4212,7 +4214,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>
>  			if (!ptr_cid_info) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Failed to allocate memory"
> +					    "BM_%d : Failed to allocate memory "
>  					    "for ULP_CID_INFO for ULP : %d\n",
>  					    ulp_num);
>  				ret = -ENOMEM;
> @@ -4226,7 +4228,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>  						  ulp_num), GFP_KERNEL);
>  			if (!ptr_cid_info->cid_array) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Failed to allocate memory"
> +					    "BM_%d : Failed to allocate memory "
>  					    "for CID_ARRAY for ULP : %d\n",
>  					    ulp_num);
>  				kfree(ptr_cid_info);
> @@ -4257,7 +4259,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>  				   phba->params.cxns_per_ctrl, GFP_KERNEL);
>  	if (!phba->conn_table) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : Failed to allocate memory in"
> +			    "BM_%d : Failed to allocate memory in "
>  			    "hba_setup_cid_tbls\n");
>
>  		kfree(phba->ep_array);
> @@ -4397,7 +4399,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR,
>  			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "beiscsi_get_session_info\n");
>
>  		return -ENOMEM;
> @@ -4418,7 +4420,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
>  	if (ret) {
>  		beiscsi_log(phba, KERN_ERR,
>  			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
> -			    "BM_%d : beiscsi_get_session_info Failed");
> +			    "BM_%d : beiscsi_get_session_info Failed\n");
>
>  		if (ret != -EBUSY)
>  			goto boot_freemem;
> @@ -4509,14 +4511,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
>  	ret = beiscsi_init_controller(phba);
>  	if (ret < 0) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_dev_probe - Failed in"
> +			    "BM_%d : beiscsi_dev_probe - Failed in "
>  			    "beiscsi_init_controller\n");
>  		return ret;
>  	}
>  	ret = beiscsi_init_sgl_handle(phba);
>  	if (ret < 0) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_dev_probe - Failed in"
> +			    "BM_%d : beiscsi_dev_probe - Failed in "
>  			    "beiscsi_init_sgl_handle\n");
>  		goto do_cleanup_ctrlr;
>  	}
> @@ -4752,7 +4754,8 @@ beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
>  			       phba->params.wrbs_per_cxn);
>  	beiscsi_log(phba, KERN_INFO,
>  		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p free_index=0x%x wrb_handles_available=%d\n",
> +		    "BM_%d : put CONTEXT_UPDATE pwrb_handle=%p "
> +		    "free_index=0x%x wrb_handles_available=%d\n",
>  		    pwrb_handle, pwrb_context->free_index,
>  		    pwrb_context->wrb_handles_available);
>  }
> @@ -4806,7 +4809,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  		if (!io_task->psgl_handle) {
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Alloc of IO_SGL_ICD Failed"
> +				    "BM_%d : Alloc of IO_SGL_ICD Failed "
>  				    "for the CID : %d\n",
>  				    beiscsi_conn->beiscsi_conn_cid);
>  			goto free_hndls;
> @@ -4817,7 +4820,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  		if (!io_task->pwrb_handle) {
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Alloc of WRB_HANDLE Failed"
> +				    "BM_%d : Alloc of WRB_HANDLE Failed "
>  				    "for the CID : %d\n",
>  				    beiscsi_conn->beiscsi_conn_cid);
>  			goto free_io_hndls;
> @@ -4833,7 +4836,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  					beiscsi_log(phba, KERN_ERR,
>  						    BEISCSI_LOG_IO |
>  						    BEISCSI_LOG_CONFIG,
> -						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
> +						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
>  						    "for the CID : %d\n",
>  						    beiscsi_conn->
>  						    beiscsi_conn_cid);
> @@ -4851,7 +4854,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  					beiscsi_log(phba, KERN_ERR,
>  						    BEISCSI_LOG_IO |
>  						    BEISCSI_LOG_CONFIG,
> -						    "BM_%d : Alloc of WRB_HANDLE Failed"
> +						    "BM_%d : Alloc of WRB_HANDLE Failed "
>  						    "for the CID : %d\n",
>  						    beiscsi_conn->
>  						    beiscsi_conn_cid);
> @@ -4872,7 +4875,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  				beiscsi_log(phba, KERN_ERR,
>  					    BEISCSI_LOG_IO |
>  					    BEISCSI_LOG_CONFIG,
> -					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
> +					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
>  					    "for the CID : %d\n",
>  					    beiscsi_conn->
>  					    beiscsi_conn_cid);
> @@ -4885,7 +4888,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  			if (!io_task->pwrb_handle) {
>  				beiscsi_log(phba, KERN_ERR,
>  					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -					    "BM_%d : Alloc of WRB_HANDLE Failed"
> +					    "BM_%d : Alloc of WRB_HANDLE Failed "
>  					    "for the CID : %d\n",
>  					    beiscsi_conn->beiscsi_conn_cid);
>  				goto free_mgmt_hndls;
> @@ -5484,7 +5487,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
>
>  	if (state == pci_channel_io_perm_failure) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : EEH : State PERM Failure");
> +			    "BM_%d : EEH : State PERM Failure\n");
>  		return PCI_ERS_RESULT_DISCONNECT;
>  	}
>
> @@ -5577,8 +5580,8 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
>  	ret = hwi_init_controller(phba);
>  	if (ret) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_eeh_resume -"
> -			     "Failed to initialize beiscsi_hba.\n");
> +			    "BM_%d : beiscsi_eeh_resume - "
> +			    "Failed to initialize beiscsi_hba.\n");
>  		goto ret_err;
>  	}
>
> --
> 2.7.4
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[toc] | [prev] | [next] | [standalone]


#1461451

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-08-12 22:40 +0200
Message-ID<s5rpf-6B6-15@gated-at.bofh.it>
In reply to#1461072
Le 12/08/2016 à 12:30, Julia Lawall a écrit :
> On Fri, 12 Aug 2016, Christophe JAILLET wrote:
>
>> This fixes:
>>     - missing spaces in string split on several lines
>>     - extra spaces after ':'
>>     - missing '\n' at the end of some messages
>>     - too long lines
> I think that the strings should be concatenated, even if they go past 80
> chars.  I'm surprised checkpatch didn't complain.
>
> julia

checkpatch did complain.
In this file, all logging messages were written with split lines when 
too long, so I considered that it was better to keep it like that.

I will resubmit if the patch gets some interest and if a maintainer ask 
for concatenated messages.

CJ

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#1461600 — [PATCH 2/2 v2] be2iscsi: Fix some error messages

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-08-13 09:20 +0200
Subject[PATCH 2/2 v2] be2iscsi: Fix some error messages
Message-ID<s5BoB-67U-3@gated-at.bofh.it>
In reply to#1461451
This fixes:
   - missing spaces in string split on several lines
   - extra spaces after ':'
   - missing '\n' at the end of some messages
   - turn a \\n to \n in 1 message (v2)
   - concatenate strings on the same line to fix checkpatch warnings (v2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 40 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 89ae6390b697..826c61b3ffcc 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  "beiscsi", phba);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register irq\\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
 			return ret;
 		}
 	}
@@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state == pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#1461601 — Re: [PATCH 2/2 v2] be2iscsi: Fix some error messages

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-08-13 09:20 +0200
SubjectRe: [PATCH 2/2 v2] be2iscsi: Fix some error messages
Message-ID<s5BoB-67U-5@gated-at.bofh.it>
In reply to#1461600

[Multipart message — attachments visible in raw view] — view raw

On Sat, 13 Aug 2016, Christophe JAILLET wrote:

> This fixes:
>    - missing spaces in string split on several lines
>    - extra spaces after ':'
>    - missing '\n' at the end of some messages
>    - turn a \\n to \n in 1 message (v2)
>    - concatenate strings on the same line to fix checkpatch warnings (v2)

v2 information should be under the ---.  It's meaningless when the change
is actually committed.

julia

>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
>  1 file changed, 39 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
> index 89ae6390b697..826c61b3ffcc 100644
> --- a/drivers/scsi/be2iscsi/be_main.c
> +++ b/drivers/scsi/be2iscsi/be_main.c
> @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>  				&nonemb_cmd.dma);
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "mgmt_invalidate_icds\n");
>  		return FAILED;
>  	}
> @@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>  				   cid, &nonemb_cmd);
>  	if (!tag) {
>  		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
> -			    "BM_%d : mgmt_invalidate_icds could not be"
> +			    "BM_%d : mgmt_invalidate_icds could not be "
>  			    "submitted\n");
>  		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
>  				    nonemb_cmd.va, nonemb_cmd.dma);
> @@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
>  				&nonemb_cmd.dma);
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "mgmt_invalidate_icds\n");
>  		return FAILED;
>  	}
> @@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
>  					  &phwi_context->be_eq[i]);
>  			if (ret) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : beiscsi_init_irqs-Failed to"
> +					    "BM_%d : beiscsi_init_irqs-Failed to "
>  					    "register msix for i = %d\n",
>  					    i);
>  				kfree(phba->msi_name[i]);
> @@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
>  				  "beiscsi", phba);
>  		if (ret) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : beiscsi_init_irqs-"
> -				    "Failed to register irq\\n");
> +				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
>  			return ret;
>  		}
>  	}
> @@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  		 * failed in xmit_task or alloc_pdu.
>  		 */
>  		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
> -			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
> +			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
>  			     "value there=%p\n", phba->io_sgl_free_index,
>  			     phba->io_sgl_hndl_base
>  			     [phba->io_sgl_free_index]);
> @@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
>  			       phba->params.wrbs_per_cxn);
>  	beiscsi_log(phba, KERN_INFO,
>  		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
> +		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
>  		    "wrb_handles_available=%d\n",
>  		    pwrb_handle, pwrb_context->free_index,
>  		    pwrb_context->wrb_handles_available);
> @@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  {
>  	spin_lock_bh(&phba->mgmt_sgl_lock);
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
> -		    "BM_%d : In  free_mgmt_sgl_handle,"
> +		    "BM_%d : In  free_mgmt_sgl_handle, "
>  		    "eh_sgl_free_index=%d\n",
>  		    phba->eh_sgl_free_index);
>
> @@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
>  		 * failed in xmit_task or alloc_pdu.
>  		 */
>  		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
> -			    "BM_%d : Double Free in eh SGL ,"
> +			    "BM_%d : Double Free in eh SGL, "
>  			    "eh_sgl_free_index=%d\n",
>  			    phba->eh_sgl_free_index);
>  		spin_unlock_bh(&phba->mgmt_sgl_lock);
> @@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
>  	default:
>  		beiscsi_log(phba, KERN_WARNING,
>  			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
> -			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
> +			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
>  			    "wrb_index 0x%x CID 0x%x\n", type,
>  			    csol_cqe.wrb_index,
>  			    csol_cqe.cid);
> @@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
>  		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
> +				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
>  				    cqe_desc[code], code, cid);
>  			spin_lock_bh(&phba->async_pdu_lock);
>  			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
> @@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
>  		default:
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Invalid CQE Event Received Code : %d"
> +				    "BM_%d : Invalid CQE Event Received Code : %d "
>  				    "CID 0x%x...\n",
>  				    code, cid);
>  			break;
> @@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
>  					    phwi_context->cur_eqd);
>  		if (ret) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : beiscsi_cmd_eq_create"
> +				    "BM_%d : beiscsi_cmd_eq_create "
>  				    "Failed for EQ\n");
>  			goto create_eq_error;
>  		}
> @@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
>  			    phwi_context->be_eq[i].q.id);
>  	}
>  	return 0;
> +
>  create_eq_error:
>  	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
>  		eq = &phwi_context->be_eq[i].q;
> @@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
>  					    false, 0);
>  		if (ret) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : beiscsi_cmd_eq_create"
> +				    "BM_%d : beiscsi_cmd_eq_create "
>  				    "Failed for ISCSI CQ\n");
>  			goto create_cq_error;
>  		}
> @@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
>
>  	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : DEFAULT PDU DATA RING CREATED"
> +		    "BM_%d : DEFAULT PDU DATA RING CREATED "
>  		    "on ULP : %d\n", ulp_num);
>
>  	return 0;
> @@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
>
>  			if (status != 0) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Post Template HDR Failed for"
> +					    "BM_%d : Post Template HDR Failed for "
>  					    "ULP_%d\n", ulp_num);
>  				return status;
>  			}
>
>  			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -				    "BM_%d : Template HDR Pages Posted for"
> +				    "BM_%d : Template HDR Pages Posted for "
>  				    "ULP_%d\n", ulp_num);
>  		}
>  	}
> @@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
>  					    ulp_base_num);
>  		if (status != 0) {
>  			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -				    "BM_%d : wrbq create failed.");
> +				    "BM_%d : wrbq create failed.\n");
>  			kfree(pwrb_arr);
>  			return status;
>  		}
> @@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
>
>  error:
>  	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -		    "BM_%d : hwi_init_port failed");
> +		    "BM_%d : hwi_init_port failed\n");
>  	hwi_cleanup(phba);
>  	return status;
>  }
> @@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
>  		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
>  		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
>  		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
> +			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
>  			    phwi_ctrlr->phwi_ctxt);
>  	} else {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> @@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
>  	if (ret)
>  		goto free_init;
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : Return success from beiscsi_init_controller");
> +		    "BM_%d : Return success from beiscsi_init_controller\n");
>
>  	return 0;
>
> @@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
>  		}
>  	} else {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : HWI_MEM_SGLH is more than one element."
> +			    "BM_%d : HWI_MEM_SGLH is more than one element. "
>  			    "Failing to load\n");
>  		return -ENOMEM;
>  	}
> @@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
>  		idx++;
>  	}
>  	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
> -		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
> +		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
>  		    "phba->eh_sgl_hndl_avbl=%d\n",
>  		    phba->io_sgl_hndl_avbl,
>  		    phba->eh_sgl_hndl_avbl);
> @@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>
>  			if (!ptr_cid_info) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Failed to allocate memory"
> +					    "BM_%d : Failed to allocate memory "
>  					    "for ULP_CID_INFO for ULP : %d\n",
>  					    ulp_num);
>  				ret = -ENOMEM;
> @@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>  						  ulp_num), GFP_KERNEL);
>  			if (!ptr_cid_info->cid_array) {
>  				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -					    "BM_%d : Failed to allocate memory"
> +					    "BM_%d : Failed to allocate memory "
>  					    "for CID_ARRAY for ULP : %d\n",
>  					    ulp_num);
>  				kfree(ptr_cid_info);
> @@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
>  				   phba->params.cxns_per_ctrl, GFP_KERNEL);
>  	if (!phba->conn_table) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : Failed to allocate memory in"
> +			    "BM_%d : Failed to allocate memory in "
>  			    "hba_setup_cid_tbls\n");
>
>  		kfree(phba->ep_array);
> @@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR,
>  			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "beiscsi_get_session_info\n");
>
>  		return -ENOMEM;
> @@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
>  	if (ret) {
>  		beiscsi_log(phba, KERN_ERR,
>  			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
> -			    "BM_%d : beiscsi_get_session_info Failed");
> +			    "BM_%d : beiscsi_get_session_info Failed\n");
>
>  		if (ret != -EBUSY)
>  			goto boot_freemem;
> @@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
>  	ret = beiscsi_init_controller(phba);
>  	if (ret < 0) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_dev_probe - Failed in"
> +			    "BM_%d : beiscsi_dev_probe - Failed in "
>  			    "beiscsi_init_controller\n");
>  		return ret;
>  	}
>  	ret = beiscsi_init_sgl_handle(phba);
>  	if (ret < 0) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_dev_probe - Failed in"
> +			    "BM_%d : beiscsi_dev_probe - Failed in "
>  			    "beiscsi_init_sgl_handle\n");
>  		goto do_cleanup_ctrlr;
>  	}
> @@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  		if (!io_task->psgl_handle) {
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Alloc of IO_SGL_ICD Failed"
> +				    "BM_%d : Alloc of IO_SGL_ICD Failed "
>  				    "for the CID : %d\n",
>  				    beiscsi_conn->beiscsi_conn_cid);
>  			goto free_hndls;
> @@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  		if (!io_task->pwrb_handle) {
>  			beiscsi_log(phba, KERN_ERR,
>  				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -				    "BM_%d : Alloc of WRB_HANDLE Failed"
> +				    "BM_%d : Alloc of WRB_HANDLE Failed "
>  				    "for the CID : %d\n",
>  				    beiscsi_conn->beiscsi_conn_cid);
>  			goto free_io_hndls;
> @@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  					beiscsi_log(phba, KERN_ERR,
>  						    BEISCSI_LOG_IO |
>  						    BEISCSI_LOG_CONFIG,
> -						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
> +						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
>  						    "for the CID : %d\n",
>  						    beiscsi_conn->
>  						    beiscsi_conn_cid);
> @@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  					beiscsi_log(phba, KERN_ERR,
>  						    BEISCSI_LOG_IO |
>  						    BEISCSI_LOG_CONFIG,
> -						    "BM_%d : Alloc of WRB_HANDLE Failed"
> +						    "BM_%d : Alloc of WRB_HANDLE Failed "
>  						    "for the CID : %d\n",
>  						    beiscsi_conn->
>  						    beiscsi_conn_cid);
> @@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  				beiscsi_log(phba, KERN_ERR,
>  					    BEISCSI_LOG_IO |
>  					    BEISCSI_LOG_CONFIG,
> -					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
> +					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
>  					    "for the CID : %d\n",
>  					    beiscsi_conn->
>  					    beiscsi_conn_cid);
> @@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
>  			if (!io_task->pwrb_handle) {
>  				beiscsi_log(phba, KERN_ERR,
>  					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
> -					    "BM_%d : Alloc of WRB_HANDLE Failed"
> +					    "BM_%d : Alloc of WRB_HANDLE Failed "
>  					    "for the CID : %d\n",
>  					    beiscsi_conn->beiscsi_conn_cid);
>  				goto free_mgmt_hndls;
> @@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
>
>  	if (state == pci_channel_io_perm_failure) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : EEH : State PERM Failure");
> +			    "BM_%d : EEH : State PERM Failure\n");
>  		return PCI_ERS_RESULT_DISCONNECT;
>  	}
>
> @@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
>  	ret = hwi_init_controller(phba);
>  	if (ret) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
> -			    "BM_%d : beiscsi_eeh_resume -"
> -			     "Failed to initialize beiscsi_hba.\n");
> +			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
>  		goto ret_err;
>  	}
>
> --
> 2.7.4
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[toc] | [prev] | [next] | [standalone]


#1461602 — [PATCH 2/2 v3] be2iscsi: Fix some error messages

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-08-13 09:30 +0200
Subject[PATCH 2/2 v3] be2iscsi: Fix some error messages
Message-ID<s5Byh-6dt-1@gated-at.bofh.it>
In reply to#1461451
This fixes:
   - missing spaces in string split on several lines
   - extra spaces after ':'
   - missing '\n' at the end of some messages
   - turn a \\n to \n in 1 message
   - concatenate strings on the same line to fix checkpatch warnings

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v2: add:
   - turn a \\n into a \n in 1 message
   - concatenate strings on the same line to fix checkpatch warnings
v3: update log entry 
---
 drivers/scsi/be2iscsi/be_main.c | 79 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 40 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 89ae6390b697..826c61b3ffcc 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -278,7 +278,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
+			    "BM_%d : mgmt_invalidate_icds could not be "
 			    "submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
@@ -350,7 +350,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "mgmt_invalidate_icds\n");
 		return FAILED;
 	}
@@ -1010,7 +1010,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to"
+					    "BM_%d : beiscsi_init_irqs-Failed to "
 					    "register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
@@ -1040,8 +1040,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  "beiscsi", phba);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register irq\\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register irq\n");
 			return ret;
 		}
 	}
@@ -1168,7 +1167,7 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d,"
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
 			     "value there=%p\n", phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
@@ -1256,7 +1255,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x"
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
 		    "wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
@@ -1293,7 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle,"
+		    "BM_%d : In  free_mgmt_sgl_handle, "
 		    "eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
@@ -1303,7 +1302,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL ,"
+			    "BM_%d : Double Free in eh SGL, "
 			    "eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
@@ -1604,7 +1603,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d"
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
 			    "wrb_index 0x%x CID 0x%x\n", type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
@@ -2210,7 +2209,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		case UNSOL_DATA_DIGEST_ERROR_NOTIFY:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d :  Dropping %s[%d] on DPDU ring on CID : %d\n",
+				    "BM_%d : Dropping %s[%d] on DPDU ring on CID : %d\n",
 				    cqe_desc[code], code, cid);
 			spin_lock_bh(&phba->async_pdu_lock);
 			hwi_flush_default_pdu_buffer(phba, beiscsi_conn,
@@ -2243,7 +2242,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d"
+				    "BM_%d : Invalid CQE Event Received Code : %d "
 				    "CID 0x%x...\n",
 				    code, cid);
 			break;
@@ -3305,7 +3304,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for EQ\n");
 			goto create_eq_error;
 		}
@@ -3315,6 +3314,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 			    phwi_context->be_eq[i].q.id);
 	}
 	return 0;
+
 create_eq_error:
 	for (i = 0; i < (phba->num_cpus + eq_for_mcc); i++) {
 		eq = &phwi_context->be_eq[i].q;
@@ -3370,7 +3370,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create"
+				    "BM_%d : beiscsi_cmd_eq_create "
 				    "Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
@@ -3499,7 +3499,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED"
+		    "BM_%d : DEFAULT PDU DATA RING CREATED "
 		    "on ULP : %d\n", ulp_num);
 
 	return 0;
@@ -3527,13 +3527,13 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for"
+					    "BM_%d : Post Template HDR Failed for "
 					    "ULP_%d\n", ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for"
+				    "BM_%d : Template HDR Pages Posted for "
 				    "ULP_%d\n", ulp_num);
 		}
 	}
@@ -3694,7 +3694,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
 					    ulp_base_num);
 		if (status != 0) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : wrbq create failed.");
+				    "BM_%d : wrbq create failed.\n");
 			kfree(pwrb_arr);
 			return status;
 		}
@@ -3999,7 +3999,7 @@ static int hwi_init_port(struct beiscsi_hba *phba)
 
 error:
 	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-		    "BM_%d : hwi_init_port failed");
+		    "BM_%d : hwi_init_port failed\n");
 	hwi_cleanup(phba);
 	return status;
 }
@@ -4013,7 +4013,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 		phwi_ctrlr->phwi_ctxt = (struct hwi_context_memory *)phba->
 		    init_mem[HWI_MEM_ADDN_CONTEXT].mem_array[0].virtual_address;
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-			    "BM_%d :  phwi_ctrlr->phwi_ctxt=%p\n",
+			    "BM_%d : phwi_ctrlr->phwi_ctxt=%p\n",
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -4082,7 +4082,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	if (ret)
 		goto free_init;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : Return success from beiscsi_init_controller");
+		    "BM_%d : Return success from beiscsi_init_controller\n");
 
 	return 0;
 
@@ -4125,7 +4125,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element."
+			    "BM_%d : HWI_MEM_SGLH is more than one element. "
 			    "Failing to load\n");
 		return -ENOMEM;
 	}
@@ -4153,7 +4153,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d"
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
 		    "phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
@@ -4212,7 +4212,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
@@ -4226,7 +4226,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory"
+					    "BM_%d : Failed to allocate memory "
 					    "for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
@@ -4257,7 +4257,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in"
+			    "BM_%d : Failed to allocate memory in "
 			    "hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
@@ -4397,7 +4397,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for"
+			    "BM_%d : Failed to allocate memory for "
 			    "beiscsi_get_session_info\n");
 
 		return -ENOMEM;
@@ -4418,7 +4418,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info Failed");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		if (ret != -EBUSY)
 			goto boot_freemem;
@@ -4509,14 +4509,14 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in"
+			    "BM_%d : beiscsi_dev_probe - Failed in "
 			    "beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
@@ -4806,7 +4806,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed"
+				    "BM_%d : Alloc of IO_SGL_ICD Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
@@ -4817,7 +4817,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed"
+				    "BM_%d : Alloc of WRB_HANDLE Failed "
 				    "for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
@@ -4833,7 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4851,7 +4851,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed"
+						    "BM_%d : Alloc of WRB_HANDLE Failed "
 						    "for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
@@ -4872,7 +4872,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed"
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
@@ -4885,7 +4885,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed"
+					    "BM_%d : Alloc of WRB_HANDLE Failed "
 					    "for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
@@ -5484,7 +5484,7 @@ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
 
 	if (state == pci_channel_io_perm_failure) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : EEH : State PERM Failure");
+			    "BM_%d : EEH : State PERM Failure\n");
 		return PCI_ERS_RESULT_DISCONNECT;
 	}
 
@@ -5577,8 +5577,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = hwi_init_controller(phba);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume -"
-			     "Failed to initialize beiscsi_hba.\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to initialize beiscsi_hba.\n");
 		goto ret_err;
 	}
 
-- 
2.7.4


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#1461617 — Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages

FromJoe Perches <joe@perches.com>
Date2016-08-13 13:40 +0200
SubjectRe: [PATCH 2/2 v3] be2iscsi: Fix some error messages
Message-ID<s5Fsd-hg-1@gated-at.bofh.it>
In reply to#1461602
On Sat, 2016-08-13 at 09:20 +0200, Christophe JAILLET wrote:
> This fixes:
[]
>    - concatenate strings on the same line to fix checkpatch warnings
[]
> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
[]
> @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>  				&nonemb_cmd.dma);
>  	if (nonemb_cmd.va == NULL) {
>  		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> -			    "BM_%d : Failed to allocate memory for"
> +			    "BM_%d : Failed to allocate memory for "
>  			    "mgmt_invalidate_icds\n");

doesn't match commit log as no coalescing/concatenation
is done.

There are many of these.

[toc] | [prev] | [next] | [standalone]


#1461621 — Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-08-13 14:40 +0200
SubjectRe: [PATCH 2/2 v3] be2iscsi: Fix some error messages
Message-ID<s5Goh-SG-1@gated-at.bofh.it>
In reply to#1461617
Le 13/08/2016 à 13:35, Joe Perches a écrit :
>
>> @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
>>   				&nonemb_cmd.dma);
>>   	if (nonemb_cmd.va == NULL) {
>>   		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
>> -			    "BM_%d : Failed to allocate memory for"
>> +			    "BM_%d : Failed to allocate memory for "
>>   			    "mgmt_invalidate_icds\n");
> doesn't match commit log as no coalescing/concatenation
> is done.
>
> There are many of these.
>
I have *only* fixed the one reported by checkpatch and left the others 
unchanged.

My initial proposal was to fix incorrect strings, without modifying too 
much the code. So I decided to do the minimum of changes.

Should I resubmitted with:
    - all strings *in the patch* concatenated?
    - all strings *in the file*" concatenated?

CJ


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#1461656 — Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages

FromJoe Perches <joe@perches.com>
Date2016-08-13 18:50 +0200
SubjectRe: [PATCH 2/2 v3] be2iscsi: Fix some error messages
Message-ID<s5Kid-3N8-13@gated-at.bofh.it>
In reply to#1461621
On Sat, 2016-08-13 at 14:31 +0200, Christophe JAILLET wrote:
> Le 13/08/2016 à 13:35, Joe Perches a écrit :
> > > @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
> > >   				&nonemb_cmd.dma);
> > >   	if (nonemb_cmd.va == NULL) {
> > >   		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> > > -			    "BM_%d : Failed to allocate memory for"
> > > +			    "BM_%d : Failed to allocate memory for "
> > >   			    "mgmt_invalidate_icds\n");
> > doesn't match commit log as no coalescing/concatenation
> > is done.
> > 
> > There are many of these.
> > 
> I have *only* fixed the one reported by checkpatch and left the others 
> unchanged.
> 
> My initial proposal was to fix incorrect strings, without modifying too 
> much the code. So I decided to do the minimum of changes.
> 
> Should I resubmitted with:
>     - all strings *in the patch* concatenated?
>     - all strings *in the file*" concatenated?

Hello Christophe

You don't _have_ to do anything.

I think the commit message is misleading.

You could submit another patch that does
the equivalent of:

$ ./scripts/checkpatch.pl --types=SPLIT_STRING --fix-inplace drivers/scsi/be2iscsi/be_main.c

with the appropriate commit message

[toc] | [prev] | [next] | [standalone]


#1461658 — Re: [PATCH 2/2 v3] be2iscsi: Fix some error messages

FromJoe Perches <joe@perches.com>
Date2016-08-13 19:10 +0200
SubjectRe: [PATCH 2/2 v3] be2iscsi: Fix some error messages
Message-ID<s5KBz-49j-7@gated-at.bofh.it>
In reply to#1461656
On Sat, 2016-08-13 at 09:41 -0700, Joe Perches wrote:
> On Sat, 2016-08-13 at 14:31 +0200, Christophe JAILLET wrote:
> > Le 13/08/2016 à 13:35, Joe Perches a écrit :
> > > > @@ -268,7 +268,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
> > > >   				&nonemb_cmd.dma);
> > > >   	if (nonemb_cmd.va == NULL) {
> > > >   		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
> > > > -			    "BM_%d : Failed to allocate memory for"
> > > > +			    "BM_%d : Failed to allocate memory for "
> > > >   			    "mgmt_invalidate_icds\n");

This is the first time I've looked at the beiscsi_log macro.

It sure is odd and undesirable.

It's _very_ not nice to have a format string take an implied
__LINE__ argument.

It'd be much more intelligible to take the first bit as a
separate string, concatenate it in the macro with "_%d: "
and __LINE__ (if that's really useful, I think it's not)
and emit that as the format.

Something like:

diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index 30a4606..3f0fbbf 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -1084,11 +1084,12 @@ struct hwi_context_memory {
 #define __beiscsi_log(phba, level, fmt, arg...) \
 	shost_printk(level, phba->shost, fmt, __LINE__, ##arg)
 
-#define beiscsi_log(phba, level, mask, fmt, arg...) \
-do { \
-	uint32_t log_value = phba->attr_log_enable; \
-		if (((mask) & log_value) || (level[1] <= '3')) \
-			__beiscsi_log(phba, level, fmt, ##arg); \
-} while (0);
+#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
+do {									\
+	uint32_t log_value = phba->attr_log_enable;			\
+	if (((mask) & log_value) || (level[1] <= '3'))			\
+		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
+			      ##__VA_ARGS__);				\
+} while (0)
 
 #endif

So these beiscsi_log uses become something like:

	beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
		    "BM", "Failed to allocate memory for mgmt_invalidate_icds\n");

and the format and its arguments match.

[toc] | [prev] | [next] | [standalone]


#1461695 — [PATCH 1/2] be2iscsi: Coalesce split strings and formats

FromJoe Perches <joe@perches.com>
Date2016-08-14 10:40 +0200
Subject[PATCH 1/2] be2iscsi: Coalesce split strings and formats
Message-ID<s5Z7z-5sr-11@gated-at.bofh.it>
In reply to#1461658
Split strings are not preferred for ease of grep.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/be2iscsi/be_cmds.c  |  15 ++--
 drivers/scsi/be2iscsi/be_iscsi.c |  33 +++----
 drivers/scsi/be2iscsi/be_main.c  | 180 ++++++++++++++-------------------------
 drivers/scsi/be2iscsi/be_mgmt.c  |   3 +-
 4 files changed, 85 insertions(+), 146 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
index a55eaee..cefa342 100644
--- a/drivers/scsi/be2iscsi/be_cmds.c
+++ b/drivers/scsi/be2iscsi/be_cmds.c
@@ -96,8 +96,8 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 
 	if ((status & 0x80000000) || (!num_loop)) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BC_%d : Failed in be_chk_reset_complete"
-			    "status = 0x%x\n", status);
+			    "BC_%d : Failed in be_chk_reset_complete status = 0x%x\n",
+			    status);
 		return -EIO;
 	}
 
@@ -292,9 +292,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 			    BEISCSI_LOG_CONFIG,
-			    "BC_%d : MBX Cmd Failed for "
-			    "Subsys : %d Opcode : %d with "
-			    "Status : %d and Extd_Status : %d\n",
+			    "BC_%d : MBX Cmd Failed for Subsys : %d Opcode : %d with Status : %d and Extd_Status : %d\n",
 			    mbx_hdr->subsystem,
 			    mbx_hdr->opcode,
 			    status, addl_status);
@@ -304,8 +302,7 @@ int beiscsi_mccq_compl_wait(struct beiscsi_hba *phba,
 			beiscsi_log(phba, KERN_WARNING,
 				    BEISCSI_LOG_INIT | BEISCSI_LOG_EH |
 				    BEISCSI_LOG_CONFIG,
-				    "BC_%d : Insufficient Buffer Error "
-				    "Resp_Len : %d Actual_Resp_Len : %d\n",
+				    "BC_%d : Insufficient Buffer Error Resp_Len : %d Actual_Resp_Len : %d\n",
 				    mbx_resp_hdr->response_length,
 				    mbx_resp_hdr->actual_resp_len);
 			rc = -EAGAIN;
@@ -1035,8 +1032,8 @@ int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
 	int status;
 
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BC_%d : In beiscsi_cmd_q_destroy "
-		    "queue_type : %d\n", queue_type);
+		    "BC_%d : In beiscsi_cmd_q_destroy queue_type : %d\n",
+		    queue_type);
 
 	mutex_lock(&ctrl->mbox_lock);
 	memset(wrb, 0, sizeof(*wrb));
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index 09f89a3..d28ac23 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -70,9 +70,8 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
 
 	if (cmds_max > beiscsi_ep->phba->params.wrbs_per_cxn) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Cannot handle %d cmds."
-			    "Max cmds per session supported is %d. Using %d."
-			    "\n", cmds_max,
+			    "BS_%d : Cannot handle %d cmds.Max cmds per session supported is %d. Using %d.\n",
+			    cmds_max,
 			    beiscsi_ep->phba->params.wrbs_per_cxn,
 			    beiscsi_ep->phba->params.wrbs_per_cxn);
 
@@ -139,8 +138,8 @@ beiscsi_conn_create(struct iscsi_cls_session *cls_session, u32 cid)
 	phba = iscsi_host_priv(shost);
 
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_conn_create ,cid"
-		    "from iscsi layer=%d\n", cid);
+		    "BS_%d : In beiscsi_conn_create ,cidfrom iscsi layer=%d\n",
+		    cid);
 
 	cls_conn = iscsi_conn_setup(cls_session, sizeof(*beiscsi_conn), cid);
 	if (!cls_conn)
@@ -248,8 +247,7 @@ static int beiscsi_create_ipv4_iface(struct beiscsi_hba *phba)
 					      0, 0);
 	if (!phba->ipv4_iface) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Could not "
-			    "create default IPv4 address.\n");
+			    "BS_%d : Could not create default IPv4 address.\n");
 		return -ENODEV;
 	}
 
@@ -267,8 +265,7 @@ static int beiscsi_create_ipv6_iface(struct beiscsi_hba *phba)
 					      0, 0);
 	if (!phba->ipv6_iface) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Could not "
-			    "create default IPv6 address.\n");
+			    "BS_%d : Could not create default IPv6 address.\n");
 		return -ENODEV;
 	}
 
@@ -505,8 +502,7 @@ int be2iscsi_iface_set_param(struct Scsi_Host *shost,
 		 */
 		if (iface_param->iface_num) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BS_%d : Invalid iface_num %d."
-				    "Only iface_num 0 is supported.\n",
+				    "BS_%d : Invalid iface_num %d.Only iface_num 0 is supported.\n",
 				    iface_param->iface_num);
 
 			return -EINVAL;
@@ -651,8 +647,8 @@ int beiscsi_ep_get_param(struct iscsi_endpoint *ep,
 
 	beiscsi_log(beiscsi_ep->phba, KERN_INFO,
 		    BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_ep_get_param,"
-		    " param= %d\n", param);
+		    "BS_%d : In beiscsi_ep_get_param, param= %d\n",
+		    param);
 
 	switch (param) {
 	case ISCSI_PARAM_CONN_PORT:
@@ -680,8 +676,8 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
 
 	phba = ((struct beiscsi_conn *)conn->dd_data)->phba;
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BS_%d : In beiscsi_conn_set_param,"
-		    " param= %d\n", param);
+		    "BS_%d : In beiscsi_conn_set_param, param= %d\n",
+		    param);
 
 	ret = iscsi_set_param(cls_conn, param, buf, buflen);
 	if (ret)
@@ -817,8 +813,8 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
 		return -EBUSY;
 	} else {
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-			    "BS_%d : In beiscsi_get_host_param,"
-			    " param = %d\n", param);
+			    "BS_%d : In beiscsi_get_host_param, param = %d\n",
+			    param);
 	}
 
 	switch (param) {
@@ -1123,8 +1119,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
 	if (nonemb_cmd.va == NULL) {
 
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-			    "BS_%d : Failed to allocate memory for"
-			    " mgmt_open_connection\n");
+			    "BS_%d : Failed to allocate memory for mgmt_open_connection\n");
 
 		beiscsi_free_ep(beiscsi_ep);
 		return -ENOMEM;
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 826c61b3..63a5643 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -57,8 +57,7 @@ module_param(be_iopoll_budget, int, 0);
 module_param(enable_msix, int, 0);
 module_param(be_max_phys_size, uint, S_IRUGO);
 MODULE_PARM_DESC(be_max_phys_size,
-		"Maximum Size (In Kilobytes) of physically contiguous "
-		"memory that can be allocated. Range is 16 - 128");
+		"Maximum Size (In Kilobytes) of physically contiguous memory that can be allocated. Range is 16 - 128");
 
 #define beiscsi_disp_param(_name)\
 ssize_t	\
@@ -268,8 +267,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for "
-			    "mgmt_invalidate_icds\n");
+			    "BM_%d : Failed to allocate memory for mgmt_invalidate_icds\n");
 		return FAILED;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
@@ -278,8 +276,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be "
-			    "submitted\n");
+			    "BM_%d : mgmt_invalidate_icds could not be submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
 
@@ -350,8 +347,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_EH,
-			    "BM_%d : Failed to allocate memory for "
-			    "mgmt_invalidate_icds\n");
+			    "BM_%d : Failed to allocate memory for mgmt_invalidate_icds\n");
 		return FAILED;
 	}
 	nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
@@ -360,8 +356,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc)
 				   cid, &nonemb_cmd);
 	if (!tag) {
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_EH,
-			    "BM_%d : mgmt_invalidate_icds could not be"
-			    " submitted\n");
+			    "BM_%d : mgmt_invalidate_icds could not be submitted\n");
 		pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size,
 				    nonemb_cmd.va, nonemb_cmd.dma);
 		return FAILED;
@@ -1010,8 +1005,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 					  &phwi_context->be_eq[i]);
 			if (ret) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : beiscsi_init_irqs-Failed to "
-					    "register msix for i = %d\n",
+					    "BM_%d : beiscsi_init_irqs-Failed to register msix for i = %d\n",
 					    i);
 				kfree(phba->msi_name[i]);
 				goto free_msix_irqs;
@@ -1029,8 +1023,7 @@ static int beiscsi_init_irqs(struct beiscsi_hba *phba)
 				  &phwi_context->be_eq[i]);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT ,
-				    "BM_%d : beiscsi_init_irqs-"
-				    "Failed to register beiscsi_msix_mcc\n");
+				    "BM_%d : beiscsi_init_irqs-Failed to register beiscsi_msix_mcc\n");
 			kfree(phba->msi_name[i]);
 			goto free_msix_irqs;
 		}
@@ -1134,8 +1127,7 @@ static struct sgl_handle *alloc_io_sgl_handle(struct beiscsi_hba *phba)
 	spin_lock_bh(&phba->io_sgl_lock);
 	if (phba->io_sgl_hndl_avbl) {
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			    "BM_%d : In alloc_io_sgl_handle,"
-			    " io_sgl_alloc_index=%d\n",
+			    "BM_%d : In alloc_io_sgl_handle, io_sgl_alloc_index=%d\n",
 			    phba->io_sgl_alloc_index);
 
 		psgl_handle = phba->io_sgl_hndl_base[phba->
@@ -1167,8 +1159,8 @@ free_io_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_IO,
-			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, "
-			     "value there=%p\n", phba->io_sgl_free_index,
+			     "BM_%d : Double Free in IO SGL io_sgl_free_index=%d, value there=%p\n",
+			     phba->io_sgl_free_index,
 			     phba->io_sgl_hndl_base
 			     [phba->io_sgl_free_index]);
 		 spin_unlock_bh(&phba->io_sgl_lock);
@@ -1255,8 +1247,7 @@ free_wrb_handle(struct beiscsi_hba *phba, struct hwi_wrb_context *pwrb_context,
 			       phba->params.wrbs_per_cxn);
 	beiscsi_log(phba, KERN_INFO,
 		    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x "
-		    "wrb_handles_available=%d\n",
+		    "BM_%d : FREE WRB: pwrb_handle=%p free_index=0x%x wrb_handles_available=%d\n",
 		    pwrb_handle, pwrb_context->free_index,
 		    pwrb_context->wrb_handles_available);
 }
@@ -1292,8 +1283,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 {
 	spin_lock_bh(&phba->mgmt_sgl_lock);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG,
-		    "BM_%d : In  free_mgmt_sgl_handle, "
-		    "eh_sgl_free_index=%d\n",
+		    "BM_%d : In  free_mgmt_sgl_handle, eh_sgl_free_index=%d\n",
 		    phba->eh_sgl_free_index);
 
 	if (phba->eh_sgl_hndl_base[phba->eh_sgl_free_index]) {
@@ -1302,8 +1292,7 @@ free_mgmt_sgl_handle(struct beiscsi_hba *phba, struct sgl_handle *psgl_handle)
 		 * failed in xmit_task or alloc_pdu.
 		 */
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_CONFIG,
-			    "BM_%d : Double Free in eh SGL, "
-			    "eh_sgl_free_index=%d\n",
+			    "BM_%d : Double Free in eh SGL, eh_sgl_free_index=%d\n",
 			    phba->eh_sgl_free_index);
 		spin_unlock_bh(&phba->mgmt_sgl_lock);
 		return;
@@ -1592,8 +1581,7 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	case HWH_TYPE_LOGIN:
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d :\t\t No HWH_TYPE_LOGIN Expected in"
-			    " hwi_complete_cmd- Solicited path\n");
+			    "BM_%d :\t\t No HWH_TYPE_LOGIN Expected in hwi_complete_cmd - Solicited path\n");
 		break;
 
 	case HWH_TYPE_NOP:
@@ -1603,8 +1591,8 @@ static void hwi_complete_cmd(struct beiscsi_conn *beiscsi_conn,
 	default:
 		beiscsi_log(phba, KERN_WARNING,
 			    BEISCSI_LOG_CONFIG | BEISCSI_LOG_IO,
-			    "BM_%d : In hwi_complete_cmd, unknown type = %d "
-			    "wrb_index 0x%x CID 0x%x\n", type,
+			    "BM_%d : In hwi_complete_cmd, unknown type = %d wrb_index 0x%x CID 0x%x\n",
+			    type,
 			    csol_cqe.wrb_index,
 			    csol_cqe.cid);
 		break;
@@ -2242,8 +2230,7 @@ unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq, int budget)
 		default:
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Invalid CQE Event Received Code : %d "
-				    "CID 0x%x...\n",
+				    "BM_%d : Invalid CQE Event Received Code : %d CID 0x%x...\n",
 				    code, cid);
 			break;
 		}
@@ -2996,8 +2983,7 @@ static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)
 				(ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
 				beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					    "BM_%d : hwi_init_async_pdu_ctx"
-					    " HWI_MEM_ASYNC_HEADER_BUF_ULP%d va=%p\n",
+					    "BM_%d : hwi_init_async_pdu_ctx HWI_MEM_ASYNC_HEADER_BUF_ULP%d va=%p\n",
 					    ulp_num,
 					    mem_descr->mem_array[0].
 					    virtual_address);
@@ -3019,8 +3005,7 @@ static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
 				beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					    "BM_%d : hwi_init_async_pdu_ctx"
-					    " HWI_MEM_ASYNC_HEADER_RING_ULP%d va=%p\n",
+					    "BM_%d : hwi_init_async_pdu_ctx HWI_MEM_ASYNC_HEADER_RING_ULP%d va=%p\n",
 					    ulp_num,
 					    mem_descr->mem_array[0].
 					    virtual_address);
@@ -3038,8 +3023,7 @@ static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
 				beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					    "BM_%d : hwi_init_async_pdu_ctx"
-					    " HWI_MEM_ASYNC_HEADER_HANDLE_ULP%d va=%p\n",
+					    "BM_%d : hwi_init_async_pdu_ctx HWI_MEM_ASYNC_HEADER_HANDLE_ULP%d va=%p\n",
 					    ulp_num,
 					    mem_descr->mem_array[0].
 					    virtual_address);
@@ -3059,8 +3043,7 @@ static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
 				beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					    "BM_%d : hwi_init_async_pdu_ctx"
-					    " HWI_MEM_ASYNC_DATA_RING_ULP%d va=%p\n",
+					    "BM_%d : hwi_init_async_pdu_ctx HWI_MEM_ASYNC_DATA_RING_ULP%d va=%p\n",
 					    ulp_num,
 					    mem_descr->mem_array[0].
 					    virtual_address);
@@ -3099,8 +3082,7 @@ static int hwi_init_async_pdu_ctx(struct beiscsi_hba *phba)
 				     (ulp_num * MEM_DESCR_OFFSET);
 			if (mem_descr->mem_array[0].virtual_address) {
 				beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-					    "BM_%d : hwi_init_async_pdu_ctx"
-					    " HWI_MEM_ASYNC_DATA_BUF_ULP%d va=%p\n",
+					    "BM_%d : hwi_init_async_pdu_ctx HWI_MEM_ASYNC_DATA_BUF_ULP%d va=%p\n",
 					    ulp_num,
 					    mem_descr->mem_array[0].
 					    virtual_address);
@@ -3304,8 +3286,7 @@ static int beiscsi_create_eqs(struct beiscsi_hba *phba,
 					    phwi_context->cur_eqd);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create "
-				    "Failed for EQ\n");
+				    "BM_%d : beiscsi_cmd_eq_create Failed for EQ\n");
 			goto create_eq_error;
 		}
 
@@ -3360,8 +3341,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 				    sizeof(struct sol_cqe), cq_vaddress);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : be_fill_queue Failed "
-				    "for ISCSI CQ\n");
+				    "BM_%d : be_fill_queue Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
 
@@ -3370,8 +3350,7 @@ static int beiscsi_create_cqs(struct beiscsi_hba *phba,
 					    false, 0);
 		if (ret) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-				    "BM_%d : beiscsi_cmd_eq_create "
-				    "Failed for ISCSI CQ\n");
+				    "BM_%d : beiscsi_cmd_eq_create Failed for ISCSI CQ\n");
 			goto create_cq_error;
 		}
 		beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
@@ -3472,8 +3451,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 			    sizeof(struct phys_addr), dq_vaddress);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : be_fill_queue Failed for DEF PDU "
-			    "DATA on ULP : %d\n",
+			    "BM_%d : be_fill_queue Failed for DEF PDU DATA on ULP : %d\n",
 			    ulp_num);
 
 		return ret;
@@ -3486,8 +3464,7 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 					      BEISCSI_DEFQ_DATA, ulp_num);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d be_cmd_create_default_pdu_queue"
-			    " Failed for DEF PDU DATA on ULP : %d\n",
+			    "BM_%d be_cmd_create_default_pdu_queue Failed for DEF PDU DATA on ULP : %d\n",
 			    ulp_num);
 		return ret;
 	}
@@ -3499,8 +3476,8 @@ beiscsi_create_def_data(struct beiscsi_hba *phba,
 
 	hwi_post_async_buffers(phba, BEISCSI_DEFQ_DATA, ulp_num);
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : DEFAULT PDU DATA RING CREATED "
-		    "on ULP : %d\n", ulp_num);
+		    "BM_%d : DEFAULT PDU DATA RING CREATED on ULP : %d\n",
+		    ulp_num);
 
 	return 0;
 }
@@ -3527,14 +3504,14 @@ beiscsi_post_template_hdr(struct beiscsi_hba *phba)
 
 			if (status != 0) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Post Template HDR Failed for "
-					    "ULP_%d\n", ulp_num);
+					    "BM_%d : Post Template HDR Failed for ULP_%d\n",
+					    ulp_num);
 				return status;
 			}
 
 			beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-				    "BM_%d : Template HDR Pages Posted for "
-				    "ULP_%d\n", ulp_num);
+				    "BM_%d : Template HDR Pages Posted for ULP_%d\n",
+				    ulp_num);
 		}
 	}
 	return 0;
@@ -4017,8 +3994,7 @@ static int hwi_init_controller(struct beiscsi_hba *phba)
 			    phwi_ctrlr->phwi_ctxt);
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_ADDN_CONTEXT is more "
-			    "than one element.Failing to load\n");
+			    "BM_%d : HWI_MEM_ADDN_CONTEXT is more than one element.Failing to load\n");
 		return -ENOMEM;
 	}
 
@@ -4073,8 +4049,7 @@ static int beiscsi_init_controller(struct beiscsi_hba *phba)
 	ret = beiscsi_get_memory(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe -"
-			    "Failed in beiscsi_alloc_memory\n");
+			    "BM_%d : beiscsi_dev_probe -Failed in beiscsi_alloc_memory\n");
 		return ret;
 	}
 
@@ -4125,8 +4100,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		}
 	} else {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : HWI_MEM_SGLH is more than one element. "
-			    "Failing to load\n");
+			    "BM_%d : HWI_MEM_SGLH is more than one element. Failing to load\n");
 		return -ENOMEM;
 	}
 
@@ -4153,8 +4127,7 @@ static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)
 		idx++;
 	}
 	beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
-		    "BM_%d : phba->io_sgl_hndl_avbl=%d "
-		    "phba->eh_sgl_hndl_avbl=%d\n",
+		    "BM_%d : phba->io_sgl_hndl_avbl=%d phba->eh_sgl_hndl_avbl=%d\n",
 		    phba->io_sgl_hndl_avbl,
 		    phba->eh_sgl_hndl_avbl);
 
@@ -4212,8 +4185,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 
 			if (!ptr_cid_info) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory "
-					    "for ULP_CID_INFO for ULP : %d\n",
+					    "BM_%d : Failed to allocate memory for ULP_CID_INFO for ULP : %d\n",
 					    ulp_num);
 				ret = -ENOMEM;
 				goto free_memory;
@@ -4226,8 +4198,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 						  ulp_num), GFP_KERNEL);
 			if (!ptr_cid_info->cid_array) {
 				beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-					    "BM_%d : Failed to allocate memory "
-					    "for CID_ARRAY for ULP : %d\n",
+					    "BM_%d : Failed to allocate memory for CID_ARRAY for ULP : %d\n",
 					    ulp_num);
 				kfree(ptr_cid_info);
 				ptr_cid_info = NULL;
@@ -4246,8 +4217,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				 phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->ep_array) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in "
-			    "hba_setup_cid_tbls\n");
+			    "BM_%d : Failed to allocate memory in hba_setup_cid_tbls\n");
 		ret = -ENOMEM;
 
 		goto free_memory;
@@ -4257,8 +4227,7 @@ static int hba_setup_cid_tbls(struct beiscsi_hba *phba)
 				   phba->params.cxns_per_ctrl, GFP_KERNEL);
 	if (!phba->conn_table) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Failed to allocate memory in "
-			    "hba_setup_cid_tbls\n");
+			    "BM_%d : Failed to allocate memory in hba_setup_cid_tbls\n");
 
 		kfree(phba->ep_array);
 		phba->ep_array = NULL;
@@ -4397,8 +4366,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : Failed to allocate memory for "
-			    "beiscsi_get_session_info\n");
+			    "BM_%d : Failed to allocate memory for beiscsi_get_session_info\n");
 
 		return -ENOMEM;
 	}
@@ -4408,8 +4376,7 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba)
 	if (!tag) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG,
-			    "BM_%d : beiscsi_get_session_info"
-			    " Failed\n");
+			    "BM_%d : beiscsi_get_session_info Failed\n");
 
 		goto boot_freemem;
 	}
@@ -4509,15 +4476,13 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 	ret = beiscsi_init_controller(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in "
-			    "beiscsi_init_controller\n");
+			    "BM_%d : beiscsi_dev_probe - Failed in beiscsi_init_controller\n");
 		return ret;
 	}
 	ret = beiscsi_init_sgl_handle(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe - Failed in "
-			    "beiscsi_init_sgl_handle\n");
+			    "BM_%d : beiscsi_dev_probe - Failed in beiscsi_init_sgl_handle\n");
 		goto do_cleanup_ctrlr;
 	}
 
@@ -4580,8 +4545,8 @@ static void beiscsi_clean_port(struct beiscsi_hba *phba)
 			if (mgmt_status)
 				beiscsi_log(phba, KERN_WARNING,
 					    BEISCSI_LOG_INIT,
-					    "BM_%d : mgmt_epfw_cleanup FAILED"
-					    " for ULP_%d\n", ulp_num);
+					    "BM_%d : mgmt_epfw_cleanup FAILED for ULP_%d\n",
+					    ulp_num);
 		}
 	}
 
@@ -4806,8 +4771,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->psgl_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of IO_SGL_ICD Failed "
-				    "for the CID : %d\n",
+				    "BM_%d : Alloc of IO_SGL_ICD Failed for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_hndls;
 		}
@@ -4817,8 +4781,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 		if (!io_task->pwrb_handle) {
 			beiscsi_log(phba, KERN_ERR,
 				    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-				    "BM_%d : Alloc of WRB_HANDLE Failed "
-				    "for the CID : %d\n",
+				    "BM_%d : Alloc of WRB_HANDLE Failed for the CID : %d\n",
 				    beiscsi_conn->beiscsi_conn_cid);
 			goto free_io_hndls;
 		}
@@ -4833,8 +4796,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
-						    "for the CID : %d\n",
+						    "BM_%d : Alloc of MGMT_SGL_ICD Failed for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
 					goto free_hndls;
@@ -4851,8 +4813,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 					beiscsi_log(phba, KERN_ERR,
 						    BEISCSI_LOG_IO |
 						    BEISCSI_LOG_CONFIG,
-						    "BM_%d : Alloc of WRB_HANDLE Failed "
-						    "for the CID : %d\n",
+						    "BM_%d : Alloc of WRB_HANDLE Failed for the CID : %d\n",
 						    beiscsi_conn->
 						    beiscsi_conn_cid);
 					goto free_mgmt_hndls;
@@ -4872,8 +4833,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO |
 					    BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of MGMT_SGL_ICD Failed "
-					    "for the CID : %d\n",
+					    "BM_%d : Alloc of MGMT_SGL_ICD Failed for the CID : %d\n",
 					    beiscsi_conn->
 					    beiscsi_conn_cid);
 				goto free_hndls;
@@ -4885,8 +4845,7 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
 			if (!io_task->pwrb_handle) {
 				beiscsi_log(phba, KERN_ERR,
 					    BEISCSI_LOG_IO | BEISCSI_LOG_CONFIG,
-					    "BM_%d : Alloc of WRB_HANDLE Failed "
-					    "for the CID : %d\n",
+					    "BM_%d : Alloc of WRB_HANDLE Failed for the CID : %d\n",
 					    beiscsi_conn->beiscsi_conn_cid);
 				goto free_mgmt_hndls;
 			}
@@ -5182,8 +5141,7 @@ static int beiscsi_task_xmit(struct iscsi_task *task)
 	if (num_sg < 0) {
 		beiscsi_log(phba, KERN_ERR,
 			    BEISCSI_LOG_IO | BEISCSI_LOG_ISCSI,
-			    "BM_%d : scsi_dma_map Failed "
-			    "Driver_ITT : 0x%x ITT : 0x%x Xferlen : 0x%x\n",
+			    "BM_%d : scsi_dma_map Failed Driver_ITT : 0x%x ITT : 0x%x Xferlen : 0x%x\n",
 			    be32_to_cpu(io_task->cmd_bhs->iscsi_hdr.itt),
 			    io_task->libiscsi_itt, scsi_bufflen(sc));
 
@@ -5225,8 +5183,7 @@ static int beiscsi_bsg_request(struct bsg_job *job)
 					&nonemb_cmd.dma);
 		if (nonemb_cmd.va == NULL) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BM_%d : Failed to allocate memory for "
-				    "beiscsi_bsg_request\n");
+				    "BM_%d : Failed to allocate memory for beiscsi_bsg_request\n");
 			return -ENOMEM;
 		}
 		tag = mgmt_vendor_specific_fw_cmd(&phba->ctrl, phba, job,
@@ -5262,8 +5219,7 @@ static int beiscsi_bsg_request(struct bsg_job *job)
 				    nonemb_cmd.va, nonemb_cmd.dma);
 		if (status || extd_status) {
 			beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
-				    "BM_%d : MBX Cmd Failed"
-				    " status = %d extd_status = %d\n",
+				    "BM_%d : MBX Cmd Failed status = %d extd_status = %d\n",
 				    status, extd_status);
 
 			return -EIO;
@@ -5432,8 +5388,7 @@ static void be_check_boot_session(struct beiscsi_hba *phba)
 {
 	if (beiscsi_setup_boot_info(phba))
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Could not set up "
-			    "iSCSI boot info on async event.\n");
+			    "BM_%d : Could not set up iSCSI boot info on async event.\n");
 }
 
 /*
@@ -5605,8 +5560,7 @@ static void beiscsi_eeh_resume(struct pci_dev *pdev)
 	ret = beiscsi_init_irqs(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_eeh_resume - "
-			    "Failed to beiscsi_init_irqs\n");
+			    "BM_%d : beiscsi_eeh_resume - Failed to beiscsi_init_irqs\n");
 		goto ret_err;
 	}
 
@@ -5647,8 +5601,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	ret = pci_enable_pcie_error_reporting(pcidev);
 	if (ret)
 		beiscsi_log(phba, KERN_WARNING, BEISCSI_LOG_INIT,
-			    "BM_%d : PCIe Error Reporting "
-			    "Enabling Failed\n");
+			    "BM_%d : PCIe Error Reporting Enabling Failed\n");
 
 	pci_save_state(pcidev);
 
@@ -5682,8 +5635,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	ret = be_ctrl_init(phba, pcidev);
 	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe-"
-			    "Failed in be_ctrl_init\n");
+			    "BM_%d : beiscsi_dev_probe-Failed in be_ctrl_init\n");
 		goto hba_free;
 	}
 
@@ -5736,8 +5688,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	ret = beiscsi_init_port(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe-"
-			    "Failed in beiscsi_init_port\n");
+			    "BM_%d : beiscsi_dev_probe-Failed in beiscsi_init_port\n");
 		goto free_port;
 	}
 
@@ -5757,8 +5708,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	phba->wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, phba->wq_name);
 	if (!phba->wq) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe-"
-			    "Failed to allocate work queue\n");
+			    "BM_%d : beiscsi_dev_probe-Failed to allocate work queue\n");
 		ret = -ENOMEM;
 		goto free_twq;
 	}
@@ -5783,8 +5733,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 	ret = beiscsi_init_irqs(phba);
 	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : beiscsi_dev_probe-"
-			    "Failed to beiscsi_init_irqs\n");
+			    "BM_%d : beiscsi_dev_probe-Failed to beiscsi_init_irqs\n");
 		goto free_blkenbld;
 	}
 	hwi_enable_intr(phba);
@@ -5798,8 +5747,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 		 * iscsi boot.
 		 */
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BM_%d : Could not set up "
-			    "iSCSI boot info.\n");
+			    "BM_%d : Could not set up iSCSI boot info.\n");
 
 	beiscsi_create_def_ifaces(phba);
 	schedule_delayed_work(&phba->beiscsi_hw_check_task,
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 83926e2..888567b 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -519,8 +519,7 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-			    "BG_%d : Failed to allocate memory for "
-			    "mgmt_check_supported_fw\n");
+			    "BG_%d : Failed to allocate memory for mgmt_check_supported_fw\n");
 		return -ENOMEM;
 	}
 	nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes);
-- 
2.8.0.rc4.16.g56331f8

[toc] | [prev] | [next] | [standalone]


#1461697 — [PATCH 0/2] be2iscsi: Logging neatening

FromJoe Perches <joe@perches.com>
Date2016-08-14 10:40 +0200
Subject[PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s5Z7z-5sr-19@gated-at.bofh.it>
In reply to#1461658
Joe Perches (2):
  be2iscsi: Coalesce split strings and formats
  be2iscsi: Use a standard logging style

 drivers/scsi/be2iscsi/be_cmds.c  |  61 +++---
 drivers/scsi/be2iscsi/be_iscsi.c | 115 ++++++-----
 drivers/scsi/be2iscsi/be_main.c  | 398 +++++++++++++++++----------------------
 drivers/scsi/be2iscsi/be_main.h  |  19 +-
 drivers/scsi/be2iscsi/be_mgmt.c  |  99 +++++-----
 5 files changed, 314 insertions(+), 378 deletions(-)

-- 
2.8.0.rc4.16.g56331f8

[toc] | [prev] | [next] | [standalone]


#1462141 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromBart Van Assche <Bart.VanAssche@sandisk.com>
Date2016-08-14 16:40 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s64JX-Pf-7@gated-at.bofh.it>
In reply to#1461697
On 08/13/16 13:42, Joe Perches wrote:
> Joe Perches (2):
>   be2iscsi: Coalesce split strings and formats
>   be2iscsi: Use a standard logging style

Hello Joe,

As one can see in be_main.h the "level" argument of macro beiscsi_log() 
is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and
KERN_ERR. So for these log levels beiscsi_log() is a synonym of 
shost_printk(). Have you considered to replace beiscsi_log() with 
shost_printk() for these log levels and additionally to change 
beiscsi_log() for the other log levels into pr_debug()? pr_debug() 
statements namely already can be enabled and disabled at runtime. If the 
BEISCSI_LOG_* log category would be embedded in the log text that would 
allow to eliminate the phba->attr_log_enable structure member. 
Additionally, pr_debug() has a facility for displaying the source file 
name and the line number. That would allow to leave out __LINE__ from 
be2iscsi log statements. I don't think it is useful to have that line 
number in non-debug be2iscsi log statements.

Thanks,

Bart.

[toc] | [prev] | [next] | [standalone]


#1462168 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromJoe Perches <joe@perches.com>
Date2016-08-14 18:30 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s66sp-1Uu-11@gated-at.bofh.it>
In reply to#1462141
On Sun, 2016-08-14 at 14:34 +0000, Bart Van Assche wrote:
> On 08/13/16 13:42, Joe Perches wrote:
> > Joe Perches (2):
> >   be2iscsi: Coalesce split strings and formats
> >   be2iscsi: Use a standard logging style
> Hello Joe,

Hello Bart.

> As one can see in be_main.h the "level" argument of macro beiscsi_log() 
> is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and
> KERN_ERR. So for these log levels beiscsi_log() is a synonym of 
> shost_printk(). Have you considered to replace beiscsi_log() with 
> shost_printk() for these log levels and additionally to change 
> beiscsi_log() for the other log levels into pr_debug()? pr_debug() 
> statements namely already can be enabled and disabled at runtime. If the 
> BEISCSI_LOG_* log category would be embedded in the log text that would 
> allow to eliminate the phba->attr_log_enable structure member. 
> Additionally, pr_debug() has a facility for displaying the source file 
> name and the line number. That would allow to leave out __LINE__ from 
> be2iscsi log statements. I don't think it is useful to have that line 
> number in non-debug be2iscsi log statements.

My main consideration for submitting a patch at all
was removing the apparent format/argument mismatches.

As far as I can grep, only KERN_ERR, KERN_WARNING and
KERN_INFO are actually used by be2iscsi today.

I agree with the removal of __LINE__ from the macros
as its utility is generally pretty low.

Besides, using stringify(__LINE__) is almost always
smaller object code than a format with "%d", __LINE__.

Prefixes like "BC" and "BS" are __FILE__ equivalents,
and could be removed as well with something like
"%s, kbasename(__FILE__)" used if _really_ desired.

I have no issue with defining and using beiscsi_<level>
equivalents to shost_printks.

I think the test inside beiscsi_log is better removed
with multiple specific beiscsi_<level> calls used.

I don't know why any KERN_ERR should ever be masked,
but perhaps something like:

#define beiscsi_printk(level, phba, mask, fmt, ...)		\
do {								\
	if ((mask) & (phba)->attr_log_enable)			\
		shost_printk(level, phba->shost, fmt, ##__VA_ARGS__); \
} while (0)

#define beiscsi_err(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_warn(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
#define beiscsi_info(phba, mask, fmt, ...)			\
	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)

with a sed of the .c files:

$ sed -i 's/beiscsi_log(phba, KERN_ERR/beiscsi_err(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_WARNING/beiscsi_warn(phba/g' drivers/scsi/be2iscsi/*.c
$ sed -i 's/beiscsi_log(phba, KERN_INFO/beiscsi_info(phba/g' drivers/scsi/be2iscsi/*.c

with argument realignment of those lines.

All of these are of course up to the actual maintainers of be2iscsi.

[toc] | [prev] | [next] | [standalone]


#1462177 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromBart Van Assche <Bart.VanAssche@sandisk.com>
Date2016-08-14 19:30 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s67ou-2wx-25@gated-at.bofh.it>
In reply to#1462168
On 08/14/16 09:24, Joe Perches wrote:
> On Sun, 2016-08-14 at 14:34 +0000, Bart Van Assche wrote:
>> As one can see in be_main.h the "level" argument of macro beiscsi_log()
>> is ignored for log levels KERN_EMERG, KERN_ALERT, KERN_CRIT and
>> KERN_ERR. So for these log levels beiscsi_log() is a synonym of
>> shost_printk(). Have you considered to replace beiscsi_log() with
>> shost_printk() for these log levels and additionally to change
>> beiscsi_log() for the other log levels into pr_debug()? pr_debug()
>> statements namely already can be enabled and disabled at runtime. If the
>> BEISCSI_LOG_* log category would be embedded in the log text that would
>> allow to eliminate the phba->attr_log_enable structure member.
>> Additionally, pr_debug() has a facility for displaying the source file
>> name and the line number. That would allow to leave out __LINE__ from
>> be2iscsi log statements. I don't think it is useful to have that line
>> number in non-debug be2iscsi log statements.
>
> My main consideration for submitting a patch at all
> was removing the apparent format/argument mismatches.
>
> As far as I can grep, only KERN_ERR, KERN_WARNING and
> KERN_INFO are actually used by be2iscsi today.
>
> I agree with the removal of __LINE__ from the macros
> as its utility is generally pretty low.
>
> Besides, using stringify(__LINE__) is almost always
> smaller object code than a format with "%d", __LINE__.
>
> Prefixes like "BC" and "BS" are __FILE__ equivalents,
> and could be removed as well with something like
> "%s, kbasename(__FILE__)" used if _really_ desired.
>
> I have no issue with defining and using beiscsi_<level>
> equivalents to shost_printks.
>
> I think the test inside beiscsi_log is better removed
> with multiple specific beiscsi_<level> calls used.
>
> I don't know why any KERN_ERR should ever be masked,
> but perhaps something like:
>
> #define beiscsi_printk(level, phba, mask, fmt, ...)		\
> do {								\
> 	if ((mask) & (phba)->attr_log_enable)			\
> 		shost_printk(level, phba->shost, fmt, ##__VA_ARGS__); \
> } while (0)
>
> #define beiscsi_err(phba, mask, fmt, ...)			\
> 	beiscsi_printk(KERN_ERR, phba, mask, fmt, ##__VA_ARGS__)
> #define beiscsi_warn(phba, mask, fmt, ...)			\
> 	beiscsi_printk(KERN_WARNING, phba, mask, fmt, ##__VA_ARGS__)
> #define beiscsi_info(phba, mask, fmt, ...)			\
> 	beiscsi_printk(KERN_INFO, phba, mask, fmt, ##__VA_ARGS__)
>
> with a sed of the .c files:
>
> $ sed -i 's/beiscsi_log(phba, KERN_ERR/beiscsi_err(phba/g' drivers/scsi/be2iscsi/*.c
> $ sed -i 's/beiscsi_log(phba, KERN_WARNING/beiscsi_warn(phba/g' drivers/scsi/be2iscsi/*.c
> $ sed -i 's/beiscsi_log(phba, KERN_INFO/beiscsi_info(phba/g' drivers/scsi/be2iscsi/*.c
>
> with argument realignment of those lines.
>
> All of these are of course up to the actual maintainers of be2iscsi.

Hello Joe,

My primary concern is how to enable and disable log messages from user 
space. Many drivers define their own logging macros and export a bitmask 
that allows to enable and disable logging messages per category. These 
bitmask control mechanisms are annoying because figuring out what bit 
controls which message category requires a search through the driver 
source code. I'd like to see all these custom logging macros disappear 
and being replaced by a single mechanism. The "dynamic debug" mechanism 
e.g. is in my opinion much easier to use than the different custom 
logging mechanisms.

Bart.

Bart.

[toc] | [prev] | [next] | [standalone]


#1462180 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromJoe Perches <joe@perches.com>
Date2016-08-14 19:40 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s67ya-2zB-13@gated-at.bofh.it>
In reply to#1462177
On Sun, 2016-08-14 at 17:09 +0000, Bart Van Assche wrote:

> My primary concern is how to enable and disable log messages from user 
> space. Many drivers define their own logging macros and export a bitmask 
> that allows to enable and disable logging messages per category. These 
> bitmask control mechanisms are annoying because figuring out what bit 
> controls which message category requires a search through the driver 
> source code. I'd like to see all these custom logging macros disappear 
> and being replaced by a single mechanism. The "dynamic debug" mechanism 
> e.g. is in my opinion much easier to use than the different custom 
> logging mechanisms.

Dynamic debug doesn't have a bitmask function and
still requires looking through the code for lines
and format strings.

I think you are looking for a system wide equivalent
for the ethtool/netif_<level> mechanism.

Nothing like that exists currently.

Some code uses a bitmask/and, other code uses a
level/comparison.

Care to propose something?

[toc] | [prev] | [next] | [standalone]


#1464279 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromBart Van Assche <Bart.VanAssche@sandisk.com>
Date2016-08-17 04:00 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s6Yj7-2C8-1@gated-at.bofh.it>
In reply to#1462180
On 08/14/16 10:29, Joe Perches wrote:
> On Sun, 2016-08-14 at 17:09 +0000, Bart Van Assche wrote:
>> My primary concern is how to enable and disable log messages from user
>> space. Many drivers define their own logging macros and export a bitmask
>> that allows to enable and disable logging messages per category. These
>> bitmask control mechanisms are annoying because figuring out what bit
>> controls which message category requires a search through the driver
>> source code. I'd like to see all these custom logging macros disappear
>> and being replaced by a single mechanism. The "dynamic debug" mechanism
>> e.g. is in my opinion much easier to use than the different custom
>> logging mechanisms.
>
> Dynamic debug doesn't have a bitmask function and
> still requires looking through the code for lines
> and format strings.
>
> I think you are looking for a system wide equivalent
> for the ethtool/netif_<level> mechanism.
>
> Nothing like that exists currently.
>
> Some code uses a bitmask/and, other code uses a
> level/comparison.
>
> Care to propose something?

Hello Joe,

As far as I can see all that the ethtool msglevel API implements is a 
mechanism to query and set the log level from user space. What various 
SCSI drivers implement is not a log level but a log mask mechanism. How 
about the following approach to associate a name with each bit in a log 
mask, to export these names to user space and to make it possible to 
enable/disable messages per log category:
* Introduce a variant of pr_debug() that allows to specify a textual
   representation of the log category (a short string without spaces).
* Make the log category names available in
   /sys/kernel/debug/dynamic_debug/...
* Today dynamic debug allows to enable/disable log messages by
   specifying the source file name, function name, line number, module
   name and/or format string. My proposal is to make it also possible to
   enable/disable log messages based on the log category name.

Anyway, this is just a proposal. Anyone is welcome to come up with an 
alternative proposal.

Bart.

[toc] | [prev] | [next] | [standalone]


#1464299 — Re: [PATCH 0/2] be2iscsi: Logging neatening

FromJoe Perches <joe@perches.com>
Date2016-08-17 05:40 +0200
SubjectRe: [PATCH 0/2] be2iscsi: Logging neatening
Message-ID<s6ZRT-3Oc-3@gated-at.bofh.it>
In reply to#1464279
On Wed, 2016-08-17 at 01:19 +0000, Bart Van Assche wrote:
> On 08/14/16 10:29, Joe Perches wrote:
> > On Sun, 2016-08-14 at 17:09 +0000, Bart Van Assche wrote:
> > > My primary concern is how to enable and disable log messages from user
> > > space.
[]
> > I think you are looking for a system wide equivalent
> > for the ethtool/netif_ mechanism.
> > 
> > Nothing like that exists currently.
> > 
> > Some code uses a bitmask/and, other code uses a
> > level/comparison.
[]
> As far as I can see all that the ethtool msglevel API implements is a 
> mechanism to query and set the log level from user space. What various 
> SCSI drivers implement is not a log level but a log mask mechanism. How 
> about the following approach to associate a name with each bit in a log 
> mask, to export these names to user space and to make it possible to 
> enable/disable messages per log category:
> * Introduce a variant of pr_debug() that allows to specify a textual
>    representation of the log category (a short string without spaces).
> * Make the log category names available in
>    /sys/kernel/debug/dynamic_debug/...
> * Today dynamic debug allows to enable/disable log messages by
>    specifying the source file name, function name, line number, module
>    name and/or format string. My proposal is to make it also possible to
>    enable/disable log messages based on the log category name.

Many of these logging mechanisms are not just debug
facilities.

Perhaps a dynamic_debug control would be inappropriate.

There have also been various custom scsi log level
facilities like the blogic_msg for the very old
BusLogic blogic_msg.

These functions also sometimes write into some
device-specific buffer.

Perhaps the largest problem, if this is to be scsi only
rather than system wide, is finding out what and how
the various bits in a mask should be used.

[toc] | [prev] | [next] | [standalone]


#1463654 — Re: [PATCH] be2iscsi: Use a more current logging style

FromJoe Perches <joe@perches.com>
Date2016-08-16 12:30 +0200
SubjectRe: [PATCH] be2iscsi: Use a more current logging style
Message-ID<s6JN8-1Ri-21@gated-at.bofh.it>
In reply to#1462168
On Tue, 2016-08-16 at 11:32 +0530, Jitendra Bhivare wrote:
> Thanks Joe for taking this up. It has been pending for long time from our
> side.

Thanks, not a problem, it took ~10 minutes.

There was a bit of an issue about your reply though.

First there was ~50 k of quoted stuff without any content

> [ hundreds and hundreds of quoted lines ]

and then this happened:

> > diff --git a/drivers/scsi/be2iscsi/be_main.h
> b/drivers/scsi/be2iscsi/be_main.h
> > 
> > index aa9c682..7cce6e3 100644
> > --- a/drivers/scsi/be2iscsi/be_main.h
> > +++ b/drivers/scsi/be2iscsi/be_main.h
> > @@ -1081,15 +1081,19 @@ struct hwi_context_memory {
> >  #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
> >  #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol related
> Logs */
> > 
> > 
> > -#define __beiscsi_log(phba, level, fmt, ...)				\
> > -	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
> > -
> > -#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
> > +#define beiscsi_printk(level, phba, mask, fmt, ...)			\
> >  do {									\
> > -	uint32_t log_value = phba->attr_log_enable;			\
> > -	if (((mask) & log_value) || (level[1] <= '3'))			\
> > -		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
> > -			      __LINE__, ##__VA_ARGS__);			\
> > +	if ((mask) & (phba)->attr_log_enable)				\
> > +		shost_printk(level, phba->shost,			\
> [JB] PCI dev_printk would be more useful with SCSI host_no included by
> default in the message.

This is a good note that seems simple enough, but I almost
missed this.

Given the reply at the top and the _very_ long uncommented
quoted block, I just about assumed it was a useless block
quote that you didn't bother to trim.

Please make it easier to find your replies and notes by
deleting irrelevant quoted stuff.

Also, I think I misread the code.

The original code is <= '3' i.e.: show all KERN_ERR.
That is not correct in the new code.

I don't know the code well and don't have a test bed with
the hardware.

Is it possible for a beiscsi_<level> message to be called
before phba->pcidev is set to a valid value in
beiscsi_hba_alloc?   It appears the code is careful to
only use dev_<level> logging calls before probe.

[toc] | [prev] | [next] | [standalone]


#1464302 — RE: [PATCH] be2iscsi: Use a more current logging style

FromJitendra Bhivare <jitendra.bhivare@broadcom.com>
Date2016-08-17 06:00 +0200
SubjectRE: [PATCH] be2iscsi: Use a more current logging style
Message-ID<s70bf-3UI-1@gated-at.bofh.it>
In reply to#1463654
> -----Original Message-----
> From: Joe Perches [mailto:joe@perches.com]
> Sent: Tuesday, August 16, 2016 3:57 PM
> To: Jitendra Bhivare; Christophe JAILLET; Jayamohan Kallickal; Ketan
Mukadam
> Cc: Bart Van Assche; James E.J. Bottomley; Martin K. Petersen; linux-
> scsi@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] be2iscsi: Use a more current logging style
>
> On Tue, 2016-08-16 at 11:32 +0530, Jitendra Bhivare wrote:
> > Thanks Joe for taking this up. It has been pending for long time from
> > our side.
>
> Thanks, not a problem, it took ~10 minutes.
>
> There was a bit of an issue about your reply though.
>
> First there was ~50 k of quoted stuff without any content
>
> > [ hundreds and hundreds of quoted lines ]
>
> and then this happened:
>
> > > diff --git a/drivers/scsi/be2iscsi/be_main.h
> > b/drivers/scsi/be2iscsi/be_main.h
> > >
> > > index aa9c682..7cce6e3 100644
> > > --- a/drivers/scsi/be2iscsi/be_main.h
> > > +++ b/drivers/scsi/be2iscsi/be_main.h
> > > @@ -1081,15 +1081,19 @@ struct hwi_context_memory {
> > >  #define BEISCSI_LOG_CONFIG	0x0020	/* CONFIG Code Path */
> > >  #define BEISCSI_LOG_ISCSI	0x0040	/* SCSI/iSCSI Protocol
related
> > Logs */
> > >
> > >
> > > -#define __beiscsi_log(phba, level, fmt, ...)
\
> > > -	shost_printk(level, phba->shost, fmt, ##__VA_ARGS__)
> > > -
> > > -#define beiscsi_log(phba, level, mask, prefix, fmt, ...)		\
> > > +#define beiscsi_printk(level, phba, mask, fmt, ...)
\
> > >  do {
> 	\
> > > -	uint32_t log_value = phba->attr_log_enable;			\
> > > -	if (((mask) & log_value) || (level[1] <= '3'))			\
> > > -		__beiscsi_log(phba, level, prefix "_%d: " fmt,		\
> > > -			      __LINE__, ##__VA_ARGS__);			\
> > > +	if ((mask) & (phba)->attr_log_enable)				\
> > > +		shost_printk(level, phba->shost,			\
> > [JB] PCI dev_printk would be more useful with SCSI host_no included by
> > default in the message.
>
> This is a good note that seems simple enough, but I almost missed this.
>
> Given the reply at the top and the _very_ long uncommented quoted block,
I just
> about assumed it was a useless block quote that you didn't bother to
trim.
>
> Please make it easier to find your replies and notes by deleting
irrelevant quoted
> stuff.
>
> Also, I think I misread the code.
>
> The original code is <= '3' i.e.: show all KERN_ERR.
> That is not correct in the new code.
>
> I don't know the code well and don't have a test bed with the hardware.
>
> Is it possible for a beiscsi_<level> message to be called before
phba->pcidev is
> set to a valid value in beiscsi_hba_alloc?   It appears the code is
careful to only
> use dev_<level> logging calls before probe.
[JB] KERN_ERR messages need to be logged irrespective of the masks.
I understand, that in some places, mask is unnecessarily passed.
I had made sure to call __beiscsi_log in some places.
Can we please keep it that way? So beiscsi_err calls dev_err directly or
is replaced with dev_err.

It's safe to assume pcidev will be valid for all beiscsi_log calls.
Will test your change on my setup before ack'ing.

Actually, we too wanted to get rid of BC_/BM_... line# way and replace
with
ABCD = error identifier.
A <category>
B <subcategory>
CD <error code>

But that will be substantial change with some testing requirements. For
now, this looks good.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web