diff mbox

[OPW,kernel,4/4] staging: ft1000: indentation and line length issues fixed

Message ID 3f6146a44616fda1168142a2c01a1b208cec5169.1382297596.git.kelleynnn@gmail.com
State New, archived
Headers show

Commit Message

Kelley Nielsen Oct. 20, 2013, 7:50 p.m. UTC
This patch fixes the last coding style issues in the newly extracted
function scram_boot_dwnld. Lines that were broken because they were too
long with the deep indent in the original function were joined, DEBUG
statements with long user visible strings were joined, improper levels
of indent and spaces at the start of lines were corrected, and two lines
that were accidently joined at the call to the new function have been
restored.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c    | 44 ++++++++--------------
 1 file changed, 16 insertions(+), 28 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 83535c7..56a61cf 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -576,7 +576,7 @@  static u16 scram_start_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
 
 static u16 scram_boot_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
 		u16 *request, long loader_code_address, long loader_code_size,
-	       	u16 **s_file, u8 **c_file, u8 **boot_end, long *word_length,
+		u16 **s_file, u8 **c_file, u8 **boot_end, long *word_length,
 		u16 *dpram, u32 *state)
 
 {
@@ -584,19 +584,17 @@  static u16 scram_boot_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
 	DEBUG("FT1000:STATE_BOOT_DWNLD\n");
 	ft1000dev->bootmode = 1;
 	*hshake = get_handshake(ft1000dev, HANDSHAKE_REQUEST);
-		if (*hshake == HANDSHAKE_REQUEST) {
+	if (*hshake == HANDSHAKE_REQUEST) {
 		/* Get type associated with the request. */
 		*request = get_request_type(ft1000dev);
 		switch (*request) {
 		case REQUEST_RUN_ADDRESS:
 			DEBUG("FT1000:REQUEST_RUN_ADDRESS\n");
-			put_request_value(ft1000dev,
-					  loader_code_address);
+			put_request_value(ft1000dev, loader_code_address);
 			break;
 		case REQUEST_CODE_LENGTH:
 			DEBUG("FT1000:REQUEST_CODE_LENGTH\n");
-			put_request_value(ft1000dev,
-					  loader_code_size);
+			put_request_value(ft1000dev, loader_code_size);
 			break;
 		case REQUEST_DONE_BL:
 			DEBUG("FT1000:REQUEST_DONE_BL\n");
@@ -610,22 +608,17 @@  static u16 scram_boot_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
 			break;
 		case REQUEST_CODE_SEGMENT:
 			/* DEBUG("FT1000:REQUEST_CODE_SEGMENT\n"); */
-			*word_length =
-			    get_request_value(ft1000dev);
+			*word_length = get_request_value(ft1000dev);
 			/* DEBUG("FT1000:word_length = 0x%x\n", (int)*word_length); */
 			/* NdisMSleep (100); */
 			if (*word_length > MAX_LENGTH) {
-				DEBUG
-				    ("FT1000:download:Download error: Max length exceeded\n");
+				DEBUG("FT1000:download:Download error: Max length exceeded\n");
 				status = STATUS_FAILURE;
 				break;
 			}
-			if ((*word_length * 2 + *c_file) >
-			    *boot_end) {
+			if ((*word_length * 2 + *c_file) > *boot_end) {
 				/* Error, beyond boot code range. */
-				DEBUG
-				    ("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundary.\n",
-				     (int)*word_length);
+				DEBUG("FT1000:download:Download error: Requested len=%d exceeds BOOT code boundary.\n", (int)*word_length);
 				status = STATUS_FAILURE;
 				break;
 			}
@@ -635,27 +628,21 @@  static u16 scram_boot_dwnld(struct ft1000_usb *ft1000dev, u16 *hshake,
 				*word_length++;
 			*word_length = *word_length / 2;
 
-			status =
-			    write_blk(ft1000dev, s_file,
-				      c_file, *word_length);
+			status = write_blk(ft1000dev, s_file, c_file,
+					*word_length);
 			/* DEBUG("write_blk returned %d\n", status); */
 			break;
 		default:
-			DEBUG
-			    ("FT1000:download:Download error: Bad request type=%d in BOOT download state.\n",
-			     *request);
+			DEBUG("FT1000:download:Download error: Bad request type=%d in BOOT download state.\n", *request);
 			status = STATUS_FAILURE;
 			break;
 		}
 		if (ft1000dev->usbboot)
-			put_handshake_usb(ft1000dev,
-					  HANDSHAKE_RESPONSE);
+			put_handshake_usb(ft1000dev, HANDSHAKE_RESPONSE);
 		else
-			put_handshake(ft1000dev,
-				      HANDSHAKE_RESPONSE);
+			put_handshake(ft1000dev, HANDSHAKE_RESPONSE);
 	} else {
-		DEBUG
-		    ("FT1000:download:Download error: Handshake failed\n");
+		DEBUG("FT1000:download:Download error: Handshake failed\n");
 		status = STATUS_FAILURE;
 	}
 
@@ -726,7 +713,8 @@  u16 scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart,
 		switch (state) {
 		case STATE_START_DWNLD:
 			status = scram_start_dwnld(ft1000dev, &handshake,
-						   &state);					break;
+						   &state);
+			break;
 
 		case STATE_BOOT_DWNLD:
 			status = scram_boot_dwnld(ft1000dev, &handshake,