Skip to contentSkip to conversation

octeon-usb: fix 'too many leading tabs'

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Mar 18, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 octeon-usb: fix 'too many leading tabs'

This file contained a lot of warnings of line of over 80 characters and that the code needs to be refactored due to nested if else conditions.

The file was accordingly edited to remove some of the warnings.

---
 drivers/staging/octeon-usb/octeon-hcd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/octeon-usb/octeon-hcd.c +4 -4
index c8df0c3..e944292 100644
@@ -2920,11 +2920,11 @@ static int __cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
 					 */
 					if (!usbc_hcchar.s.epdir) {
 						if (buffer_space_left < pipe->max_packet)
-							transaction->actual_bytes +=
-								buffer_space_left;
+						    transaction->actual_bytes +=
+							      buffer_space_left;
 						else
-							transaction->actual_bytes +=
-								pipe->max_packet;
+						    transaction->actual_bytes +=
+							       pipe->max_packet;
 					}
 				} else if ((buffer_space_left == 0) ||
 						(bytes_in_last_packet <
Signature · 1 line
1.9.1
#1 lore raw

Hi,

Quoted 18 lines · Amitoj Kaur Chawla

This file contained a lot of warnings of line of over 80 characters and that the code needs to be refactored due to nested if else conditions.

The file was accordingly edited to remove some of the warnings.

---
 drivers/staging/octeon-usb/octeon-hcd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/octeon-usb/octeon-hcd.c +0 -0
index c8df0c3..e944292 100644
@@ -2920,11 +2920,11 @@ static int __cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel)
 					 */
 					if (!usbc_hcchar.s.epdir) {

drivers/staging/octeon-usb/octeon-hcd.c static int __cvmx_usb_poll_channel(struct cvmx_usb_state *usb, int channel) · line 2927

Quoted 10 lines
drivers/staging/octeon-usb/octeon-hcd.c +4 -4
 						if (buffer_space_left < pipe->max_packet)
-							transaction->actual_bytes +=
-								buffer_space_left;
+						    transaction->actual_bytes +=
+							      buffer_space_left;
 						else
-							transaction->actual_bytes +=
-								pipe->max_packet;
+						    transaction->actual_bytes +=
+							       pipe->max_packet;

You could reduce deep indentation here by moving the whole ACK bit handling into a separate function.

A.