linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Afonso Bordado <afonsobordado@az8.co>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/4] staging: emxx_udc: Rename CamelCase variable
Date: Tue, 20 Dec 2016 13:55:06 +0000	[thread overview]
Message-ID: <3d4dbd248c16c2673004e35b5bbd95a454fab422.1482241751.git.afonsobordado@az8.co> (raw)
In-Reply-To: <cover.1482241751.git.afonsobordado@az8.co>
In-Reply-To: <cover.1482241751.git.afonsobordado@az8.co>

The new name complies with the kernel styling guidelines and is more descriptive.

Signed-off-by: Afonso Bordado <afonsobordado@az8.co>
---
 drivers/staging/emxx_udc/emxx_udc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 51ad04b..0963533 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -557,21 +557,17 @@ static int ep0_out_pio(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
 {
 	u32		i;
 	int		nret   = 0;
-	u32		iWordLength = 0;
+	u32 numreads = length / sizeof(u32);
 	union usb_reg_access *pBuf32 = (union usb_reg_access *)pBuf;
 
 	/*------------------------------------------------------------*/
-	/* Read Length */
-	iWordLength = length / sizeof(u32);
-
-	/*------------------------------------------------------------*/
 	/* PIO Read */
-	if (iWordLength) {
-		for (i = 0; i < iWordLength; i++) {
+	if (numreads) {
+		for (i = 0; i < numreads; i++) {
 			pBuf32->dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
 			pBuf32++;
 		}
-		nret = iWordLength * sizeof(u32);
+		nret = numreads * sizeof(u32);
 	}
 
 	return nret;
-- 
2.9.3

  parent reply	other threads:[~2016-12-20 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 13:55 [PATCH v3 0/4] staging: emxx_udc: Fix checkpatch.pl CamelCase issues Afonso Bordado
2016-12-20 13:55 ` [PATCH v3 1/4] staging: emxx_udc: Fix CamelCase function name Afonso Bordado
2016-12-20 13:55 ` Afonso Bordado [this message]
2016-12-20 13:55 ` [PATCH v3 3/4] staging: emxx_udc: Remove unecessary temporary variable Afonso Bordado
2016-12-20 13:55 ` [PATCH v3 4/4] staging: emxx_udc: Fix CamelCase variable name Afonso Bordado

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=3d4dbd248c16c2673004e35b5bbd95a454fab422.1482241751.git.afonsobordado@az8.co \
    --to=afonsobordado@az8.co \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@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).