All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Baldyga <r.baldyga@samsung.com>
To: balbi@ti.com, johnyoun@synopsys.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
	b.zolnierkie@samsung.com, Robert Baldyga <r.baldyga@samsung.com>
Subject: [PATCH v2 3/5] usb: dwc2: gadget: change variable name to more meaningful
Date: Wed, 03 Feb 2016 12:36:32 +0100	[thread overview]
Message-ID: <1454499394-4610-4-git-send-email-r.baldyga@samsung.com> (raw)
In-Reply-To: <1454499394-4610-1-git-send-email-r.baldyga@samsung.com>

Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/dwc2/gadget.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 5de9236..f01a936 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -167,7 +167,7 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg,
  */
 static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
 {
-	unsigned int ep;
+	unsigned int fifo;
 	unsigned int addr;
 	int timeout;
 	u32 dptxfsizn;
@@ -198,8 +198,8 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
 	 * them to endpoints dynamically according to maxpacket size value of
 	 * given endpoint.
 	 */
-	for (ep = 1; ep < MAX_EPS_CHANNELS; ep++) {
-		dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(ep));
+	for (fifo = 1; fifo < MAX_EPS_CHANNELS; fifo++) {
+		dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(fifo));
 
 		val = (dptxfsizn & FIFOSIZE_DEPTH_MASK) | addr;
 		addr += dptxfsizn >> FIFOSIZE_DEPTH_SHIFT;
@@ -207,7 +207,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
 		if (addr > hsotg->fifo_mem)
 			break;
 
-		dwc2_writel(val, hsotg->regs + DPTXFSIZN(ep));
+		dwc2_writel(val, hsotg->regs + DPTXFSIZN(fifo));
 	}
 
 	/*
-- 
1.9.1

  parent reply	other threads:[~2016-02-03 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 11:36 [PATCH v2 0/5] usb: dwc2: gadget: Fix TX FIFO handling Robert Baldyga
2016-02-03 11:36 ` [PATCH v2 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers Robert Baldyga
2016-02-04 12:25   ` Vahram Aharonyan
2017-01-09  8:13     ` Morgan Chang
2016-02-03 11:36 ` [PATCH v2 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization Robert Baldyga
2016-02-04 13:07   ` Vahram Aharonyan
2016-02-03 11:36 ` Robert Baldyga [this message]
2016-02-03 11:36 ` [PATCH v2 4/5] usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable() Robert Baldyga
2016-02-03 11:36 ` [PATCH v2 5/5] usb: dwc2: gadget: free TX FIFO after killing requests Robert Baldyga

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=1454499394-4610-4-git-send-email-r.baldyga@samsung.com \
    --to=r.baldyga@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnyoun@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.