Skip to contentSkip to conversation

staging/emxx_udc: Fix styling issues

PATCH In review Zhengyi Shen 2 participants 2 messages Feb 2, 2017 – Feb 3, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/emxx_udc: Fix styling issues

Fix line over 80 characters.
Statements longer than 80 columns were broken into sensible chunks. Descendants in four different palces were in the same uniform style.

---
 drivers/staging/emxx_udc/emxx_udc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/staging/emxx_udc/emxx_udc.c +8 -5
index 77b242e..e771aee 100644
@@ -902,7 +902,8 @@ static int _nbu2ss_epn_out_pio(
 		/* Copy of every four bytes */
 		for (i = 0; i < iWordLength; i++) {
 			pBuf32->dw =
-			_nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
+				_nbu2ss_readl(
+					&preg->EP_REGS[ep->epnum - 1].EP_READ);
 			pBuf32++;
 		}
 		result = iWordLength * sizeof(u32);
@@ -912,7 +913,8 @@ static int _nbu2ss_epn_out_pio(
 	if (data > 0) {
 		/*---------------------------------------------------------*/
 		/* Copy of fraction byte */
-		Temp32.dw = _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
+		Temp32.dw =
+			_nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
 		for (i = 0 ; i < data ; i++)
 			pBuf32->byte.DATA[i] = Temp32.byte.DATA[i];
 		result += data;
@@ -977,8 +979,8 @@ static int _nbu2ss_epn_out_transfer(
 
 	/*-------------------------------------------------------------*/
 	/* Receive Length */
-	iRecvLength
-		= _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
+	iRecvLength =
+		_nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
 
 	if (iRecvLength != 0) {
 		result = _nbu2ss_epn_out_data(udc, ep, req, iRecvLength);
@@ -2651,7 +2653,8 @@ static int nbu2ss_ep_queue(
 	}
 
 	req = container_of(_req, struct nbu2ss_req, req);
-	if (unlikely(!_req->complete || !_req->buf || !list_empty(&req->queue))) {
+	if (unlikely(!_req->complete || !_req->buf
+			|| !list_empty(&req->queue))) {
 		if (!_req->complete)
 			pr_err("udc: %s --- !_req->complete\n", __func__);
 
Signature · 1 line
2.9.3
#1 lore raw
Quoted 14 lines · Zhengyi Shen

Fix line over 80 characters.
Statements longer than 80 columns were broken into sensible chunks. Descendants in four different palces were in the same uniform style.

---
 drivers/staging/emxx_udc/emxx_udc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/staging/emxx_udc/emxx_udc.c +0 -0
index 77b242e..e771aee 100644

drivers/staging/emxx_udc/emxx_udc.c static int _nbu2ss_epn_out_pio( · line 906

Quoted 6 lines
drivers/staging/emxx_udc/emxx_udc.c +2 -1
@@ -902,7 +902,8 @@ static int _nbu2ss_epn_out_pio(
 		/* Copy of every four bytes */
 		for (i = 0; i < iWordLength; i++) {
 			pBuf32->dw =
-			_nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
+				_nbu2ss_readl(
+					&preg->EP_REGS[ep->epnum - 1].EP_READ);

That's horrid, and not any better than the original code :(

drivers/staging/emxx_udc/emxx_udc.c static int _nbu2ss_epn_out_pio( · line 917

Quoted 10 lines
drivers/staging/emxx_udc/emxx_udc.c +2 -1
 			pBuf32++;
 		}
 		result = iWordLength * sizeof(u32);
@@ -912,7 +913,8 @@ static int _nbu2ss_epn_out_pio(
 	if (data > 0) {
 		/*---------------------------------------------------------*/
 		/* Copy of fraction byte */
-		Temp32.dw = _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);
+		Temp32.dw =
+			_nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_READ);

Same here, please leave the original as-is.

Quoted 15 lines
drivers/staging/emxx_udc/emxx_udc.c +2 -2
 		for (i = 0 ; i < data ; i++)
 			pBuf32->byte.DATA[i] = Temp32.byte.DATA[i];
 		result += data;
@@ -977,8 +979,8 @@ static int _nbu2ss_epn_out_transfer(
 
 	/*-------------------------------------------------------------*/
 	/* Receive Length */
-	iRecvLength
-		= _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
+	iRecvLength =
+		_nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
 
 	if (iRecvLength != 0) {
 		result = _nbu2ss_epn_out_data(udc, ep, req, iRecvLength);

drivers/staging/emxx_udc/emxx_udc.c static int nbu2ss_ep_queue( · line 2657

Quoted 6 lines
drivers/staging/emxx_udc/emxx_udc.c +2 -1
@@ -2651,7 +2653,8 @@ static int nbu2ss_ep_queue(
 	}
 
 	req = container_of(_req, struct nbu2ss_req, req);
-	if (unlikely(!_req->complete || !_req->buf || !list_empty(&req->queue))) {
+	if (unlikely(!_req->complete || !_req->buf
+			|| !list_empty(&req->queue))) {

odd indentation :(