From: Amit Virdi <amit.virdi@st.com>
To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org
Cc: balbi@ti.com, pratyush.anand@gmail.com, ajay.khandelwal@st.com,
Amit Virdi <amit.virdi@st.com>
Subject: [PATCH 3/4] usb: dwc3: gadget: Remove redundant check
Date: Fri, 19 Dec 2014 12:40:17 +0530 [thread overview]
Message-ID: <54c5f1a1ba9c471f6c23cda2bc32f4cfec2ed839.1418972323.git.amit.virdi@st.com> (raw)
In-Reply-To: <cover.1418972323.git.amit.virdi@st.com>
dwc3_gadget_init_hw_endpoints calls dwc3_alloc_trb_pool only if epnum is not
equal to 0 or 1. Hence, rechecking it in the called function is redundant.
Signed-off-by: Amit Virdi <amit.virdi@st.com>
---
drivers/usb/dwc3/gadget.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8f65ab3a3b92..8c2e2fbe6f39 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -352,9 +352,6 @@ static int dwc3_alloc_trb_pool(struct dwc3_ep *dep)
if (dep->trb_pool)
return 0;
- if (dep->number == 0 || dep->number == 1)
- return 0;
-
dep->trb_pool = dma_alloc_coherent(dwc->dev,
sizeof(struct dwc3_trb) * DWC3_TRB_NUM,
&dep->trb_pool_dma, GFP_KERNEL);
--
1.8.0
prev parent reply other threads:[~2014-12-19 7:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 7:10 [PATCH 0/4] usb: dwc3: Fixes and code cleanup Amit Virdi
2014-12-19 7:10 ` [PATCH 1/4] usb: dwc3: gadget: Fix TRB preparation during SG Amit Virdi
2014-12-22 16:04 ` Felipe Balbi
2014-12-27 7:09 ` Amit Virdi
2014-12-27 17:44 ` Felipe Balbi
2014-12-29 6:29 ` Amit Virdi
[not found] ` <cover.1418972323.git.amit.virdi-qxv4g6HH51o@public.gmane.org>
2014-12-19 7:10 ` [PATCH 2/4] usb: dwc3: gadget: Stop TRB preparation after limit is reached Amit Virdi
2014-12-22 16:06 ` Felipe Balbi
2014-12-27 7:54 ` Amit Virdi
2014-12-27 17:46 ` Felipe Balbi
2014-12-29 6:35 ` Amit Virdi
2014-12-29 17:12 ` Felipe Balbi
2014-12-30 14:41 ` Amit Virdi
2014-12-30 16:02 ` Felipe Balbi
2015-01-06 6:14 ` Amit Virdi
[not found] ` <54AB7D3F.3030809-qxv4g6HH51o@public.gmane.org>
2015-01-12 18:34 ` Felipe Balbi
2015-01-13 4:48 ` Amit Virdi
2015-01-13 16:28 ` Felipe Balbi
2015-01-14 9:09 ` Amit Virdi
2015-01-14 15:39 ` Greg KH
2014-12-19 7:10 ` [PATCH 4/4] usb: dwc3: Remove current_trb as it is unused Amit Virdi
2014-12-19 7:10 ` Amit Virdi [this message]
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=54c5f1a1ba9c471f6c23cda2bc32f4cfec2ed839.1418972323.git.amit.virdi@st.com \
--to=amit.virdi@st.com \
--cc=ajay.khandelwal@st.com \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pratyush.anand@gmail.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 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).