linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH 07/10] staging: vt6656: clean up s_nsBulkInUsbIoCompleteRead
Date: Tue, 25 Feb 2014 20:51:49 +0000	[thread overview]
Message-ID: <1393361512-13805-7-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1393361512-13805-1-git-send-email-tvboxspy@gmail.com>

Clean up white space and camel case.

Camel case changes
pDevice -> priv
pRCB -> rcb
bReAllocSkb -> re_alloc_skb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/usbpipe.c | 49 ++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 1cab7a3..8092c9a 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -467,16 +467,16 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
 
 static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
 {
-	struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context;
-	struct vnt_private *pDevice = pRCB->pDevice;
-	int bReAllocSkb = false;
+	struct vnt_rcb *rcb = (struct vnt_rcb *)urb->context;
+	struct vnt_private *priv = rcb->pDevice;
+	int re_alloc_skb = false;
 
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
+	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
 
 	switch (urb->status) {
 	case 0:
-		pDevice->ulBulkInContCRCError = 0;
-		pDevice->ulBulkInBytesRead += urb->actual_length;
+		priv->ulBulkInContCRCError = 0;
+		priv->ulBulkInBytesRead += urb->actual_length;
 		break;
 	case -ECONNRESET:
 	case -ENOENT:
@@ -484,28 +484,33 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
 		return;
 	case -ETIMEDOUT:
 	default:
-		pDevice->ulBulkInError++;
+		priv->ulBulkInError++;
 		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
 				"BULK In failed %d\n", urb->status);
 		break;
 	}
 
-    if (urb->actual_length) {
-        spin_lock(&pDevice->lock);
-	if (RXbBulkInProcessData(pDevice, pRCB, urb->actual_length) == true)
-            bReAllocSkb = true;
-        spin_unlock(&pDevice->lock);
-    }
-    pRCB->Ref--;
-    if (pRCB->Ref == 0)
-    {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d \n",pDevice->NumRecvFreeList);
-        spin_lock(&pDevice->lock);
-        RXvFreeRCB(pRCB, bReAllocSkb);
-        spin_unlock(&pDevice->lock);
-    }
+	if (urb->actual_length) {
+		spin_lock(&priv->lock);
+
+		if (RXbBulkInProcessData(priv, rcb, urb->actual_length) == true)
+			re_alloc_skb = true;
+
+		spin_unlock(&priv->lock);
+	}
 
-    return;
+	rcb->Ref--;
+	if (rcb->Ref == 0) {
+		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d\n",
+							priv->NumRecvFreeList);
+		spin_lock(&priv->lock);
+
+		RXvFreeRCB(rcb, re_alloc_skb);
+
+		spin_unlock(&priv->lock);
+	}
+
+	return;
 }
 
 /*
-- 
1.9.0


  parent reply	other threads:[~2014-02-25 20:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 20:51 [PATCH 01/10] staging: vt6656: PIPEnsSendBulkOut reverse if statement Malcolm Priestley
2014-02-25 20:51 ` [PATCH 02/10] staging: vt6656: usb_fill_bulk_urb get rid of void* cast Malcolm Priestley
2014-02-25 20:51 ` [PATCH 03/10] staging: vt6656: clean up PIPEnsSendBulkOut Malcolm Priestley
2014-02-25 20:51 ` [PATCH 04/10] staging: vt6656: s_nsBulkInUsbIoCompleteRead get rid of status Malcolm Priestley
2014-02-25 20:51 ` [PATCH 05/10] staging: vt6656: s_nsBulkInUsbIoCompleteRead Remove bytesRead/bIndicateReceive Malcolm Priestley
2014-02-25 20:51 ` [PATCH 06/10] staging: vt6656: s_nsBulkInUsbIoCompleteRead Replace error handling Malcolm Priestley
2014-02-25 20:51 ` Malcolm Priestley [this message]
2014-02-25 20:51 ` [PATCH 08/10] staging: vt6656: Cleanup PIPEnsBulkInUsbRead Malcolm Priestley
2014-02-25 20:51 ` [PATCH 09/10] staging: vt6656: Remove pointer cast to urb->context Malcolm Priestley
2014-02-25 21:07   ` Malcolm Priestley
2014-02-25 20:51 ` [PATCH 10/10] staging: vt6656: struct vnt_usb_send_context struct size optimization Malcolm Priestley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393361512-13805-7-git-send-email-tvboxspy@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).