Skip to contentSkip to conversation

be2iscsi: cleanup format strings

PATCH New Masatake YAMATO 1 participant 1 message Aug 13, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 be2iscsi: cleanup format strings

In format strings for printk in be2iscsi, concatenations of constant c strings are used widely. However, the log output is a bit hard to read because whitespaces are missed in the constant c strings like:

SE_DEBUG(DBG_LVL_1, "CQ Error %d, reset"
"received/sent on CID 0x%x...\n",

You will see "CQ Error 0xffffffff resetreceived/sent on CID ..." and wonder what is "resetreceived".

This patch does cleanup these log format strings:

* joining concatenated constant c strings into one,
* inserting a white space after punctuation, and
* inserting white spaces before/after hypen.

In v2 patch concatenated constant c strings are joined into one as suggested by Joe Perches <[email protected]>.

---
 drivers/scsi/be2iscsi/be_cmds.c  |  12 ++-
 drivers/scsi/be2iscsi/be_iscsi.c |  48 +++++-------
 drivers/scsi/be2iscsi/be_main.c  | 160 +++++++++++++++------------------------
 drivers/scsi/be2iscsi/be_mgmt.c  |  10 +--
 4 files changed, 90 insertions(+), 140 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +5 -7
index d2e9e93..f6510a2 100644
@@ -93,8 +93,8 @@ int be_chk_reset_complete(struct beiscsi_hba *phba)
 	}
 
 	if ((status & 0x80000000) || (!num_loop)) {
-		printk(KERN_ERR "Failed in be_chk_reset_complete"
-		"status = 0x%x\n", status);
+		printk(KERN_ERR "Failed in be_chk_reset_complete status = 0x%x\n",
+		       status);
 		return -EIO;
 	}
 
@@ -245,8 +245,7 @@ void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
 						evt->physical_port);
 		break;
 	default:
-		SE_DEBUG(DBG_LVL_1, "Unexpected Async Notification %d on"
-				    "Physical Port %d\n",
+		SE_DEBUG(DBG_LVL_1, "Unexpected Async Notification %d on Physical Port %d\n",
 				     evt->port_link_status,
 				     evt->physical_port);
 	}
@@ -279,9 +278,8 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
 				beiscsi_async_link_state_process(phba,
 				   (struct be_async_event_link_state *) compl);
 			else
-				SE_DEBUG(DBG_LVL_1,
-					 " Unsupported Async Event, flags"
-					 " = 0x%08x\n", compl->flags);
+				SE_DEBUG(DBG_LVL_1, " Unsupported Async Event, flags = 0x%08x\n",
+					 compl->flags);
 
 		} else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) {
 				status = be_mcc_compl_process(ctrl, compl);
drivers/scsi/be2iscsi/be_iscsi.c +20 -28

120 lines not on this page · raw message

drivers/scsi/be2iscsi/be_main.c +61 -99

453 lines not on this page · raw message

drivers/scsi/be2iscsi/be_mgmt.c +4 -6
index 2a09679..433eabe 100644
@@ -122,8 +122,7 @@ int mgmt_get_fw_config(struct be_ctrl_info *ctrl,
 					pfw_cfg->ulp[0].sq_count;
 		if (phba->fw_config.iscsi_cid_count > (BE2_MAX_SESSIONS / 2)) {
 			SE_DEBUG(DBG_LVL_8,
-				"FW reported MAX CXNS as %d\t"
-				"Max Supported = %d.\n",
+				"FW reported MAX CXNS as %d\tMax Supported = %d.\n",
 				phba->fw_config.iscsi_cid_count,
 				BE2_MAX_SESSIONS);
 			phba->fw_config.iscsi_cid_count = BE2_MAX_SESSIONS / 2;
@@ -151,8 +150,7 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
 				&nonemb_cmd.dma);
 	if (nonemb_cmd.va == NULL) {
 		SE_DEBUG(DBG_LVL_1,
-			 "Failed to allocate memory for mgmt_check_supported_fw"
-			 "\n");
+			 "Failed to allocate memory for mgmt_check_supported_fw\n");
 		return -ENOMEM;
 	}
 	nonemb_cmd.size = sizeof(struct be_mgmt_controller_attributes);
@@ -551,8 +549,8 @@ static int mgmt_exec_nonemb_cmd(struct beiscsi_hba *phba,
 	status = phba->ctrl.mcc_numtag[tag] & 0x000000FF;
 	if (status || extd_status) {
 		SE_DEBUG(DBG_LVL_1,
-			 "mgmt_exec_nonemb_cmd Failed status = %d"
-			 "extd_status = %d\n", status, extd_status);
+			 "mgmt_exec_nonemb_cmd Failed status = %d extd_status = %d\n",
+			 status, extd_status);
 		rc = -EIO;
 		goto free_tag;
 	}
Signature · 1 line
1.7.11.2