From: Will Newton <will.newton@imgtec.com>
To: linux-kernel@vger.kernel.org
Cc: linux-usb@vger.kernel.org, leoli@freescale.com,
tanya.jiang@freescale.com, gregkh@suse.de,
Will Newton <will.newton@gmail.com>
Subject: [PATCH 09/11] fsl_usb2_udc: Make fsl_queue_td return type void.
Date: Tue, 15 Jul 2008 16:24:48 +0100 [thread overview]
Message-ID: <1216135490-21656-10-git-send-email-will.newton@imgtec.com> (raw)
In-Reply-To: <1216135490-21656-9-git-send-email-will.newton@imgtec.com>
From: Will Newton <will.newton@gmail.com>
fsl_queue_td always returns 0. Make it void and remove checks for non-zero
return in callers.
Signed-off-by: Will Newton <will.newton@gmail.com>
---
drivers/usb/gadget/fsl_usb2_udc.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index a6757c9..81cba99 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -592,7 +592,7 @@ static void fsl_free_request(struct usb_ep *_ep, struct usb_request *_req)
}
/*-------------------------------------------------------------------------*/
-static int fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
+static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
{
int i = ep_index(ep) * 2 + ep_is_in(ep);
u32 temp, bitmask, tmp_stat;
@@ -649,7 +649,7 @@ static int fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
: (1 << (ep_index(ep)));
fsl_writel(temp, &dr_regs->endpointprime);
out:
- return 0;
+ return;
}
/* Fill in the dTD structure
@@ -1136,7 +1136,6 @@ static int ep0_prime_status(struct fsl_udc *udc, int direction)
{
struct fsl_req *req = udc->status_req;
struct fsl_ep *ep;
- int status = 0;
if (direction == EP_DIR_IN)
udc->ep0_dir = USB_DIR_IN;
@@ -1154,15 +1153,13 @@ static int ep0_prime_status(struct fsl_udc *udc, int direction)
req->dtd_count = 0;
if (fsl_req_to_dtd(req) == 0)
- status = fsl_queue_td(ep, req);
+ fsl_queue_td(ep, req);
else
return -ENOMEM;
- if (status)
- ERR("Can't queue ep0 status request\n");
list_add_tail(&req->queue, &ep->queue);
- return status;
+ return 0;
}
static void udc_reset_ep_queue(struct fsl_udc *udc, u8 pipe)
@@ -1194,10 +1191,8 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value,
u16 index, u16 length)
{
u16 tmp = 0; /* Status, cpu endian */
-
struct fsl_req *req;
struct fsl_ep *ep;
- int status = 0;
ep = &udc->eps[0];
@@ -1236,14 +1231,10 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value,
/* prime the data phase */
if ((fsl_req_to_dtd(req) == 0))
- status = fsl_queue_td(ep, req);
+ fsl_queue_td(ep, req);
else /* no mem */
goto stall;
- if (status) {
- ERR("Can't respond to getstatus request\n");
- goto stall;
- }
list_add_tail(&req->queue, &ep->queue);
udc->ep0_state = DATA_STATE_XMIT;
return;
--
1.5.5.2
next prev parent reply other threads:[~2008-07-15 15:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 15:24 [PATCH 00/11] fsl_usb2_udc: A number of bug fixes and cleanups Will Newton
2008-07-15 15:24 ` [PATCH 01/11] fsl_usb2_udc: Make dr_ep_setup function static Will Newton
2008-07-15 15:24 ` [PATCH 02/11] fsl_usb2_udc: Remove check for udc == NULL in dr_controller_setup Will Newton
2008-07-15 15:24 ` [PATCH 03/11] fsl_usb2_udc: Fix some sparse warnings and remove redundant code Will Newton
2008-07-15 15:24 ` [PATCH 04/11] fsl_usb2_udc: Clean up whitespace in errors and warnings Will Newton
2008-07-15 15:24 ` [PATCH 05/11] fsl_usb2_udc: Clean up whitespace in /proc debugging output Will Newton
2008-07-15 15:24 ` [PATCH 06/11] fsl_usb2_udc: Initialize spinlock earlier Will Newton
2008-07-15 15:24 ` [PATCH 07/11] fsl_usb2_udc: Rename the arguments of the fsl_writel macro Will Newton
2008-07-15 15:24 ` [PATCH 08/11] fsl_usb2_udc: Uninline udc_reset_ep_queue Will Newton
2008-07-15 15:24 ` Will Newton [this message]
2008-07-15 15:24 ` [PATCH 10/11] fsl_usb2_udc: Add a wmb before priming endpoint Will Newton
2008-07-15 15:24 ` [PATCH 11/11] fsl_usb2_udc: Fix oops on probe failure Will Newton
2008-07-17 9:43 ` [PATCH 00/11] fsl_usb2_udc: A number of bug fixes and cleanups Li Yang
2008-07-17 9:47 ` Will Newton
2008-08-08 10:13 ` Will Newton
2008-08-12 11:27 ` Li Yang
2008-08-12 14:39 Will Newton
2008-08-12 14:39 ` [PATCH 01/11] fsl_usb2_udc: Make dr_ep_setup function static Will Newton
2008-08-12 14:39 ` [PATCH 02/11] fsl_usb2_udc: Remove check for udc == NULL in dr_controller_setup Will Newton
2008-08-12 14:39 ` [PATCH 03/11] fsl_usb2_udc: Fix some sparse warnings and remove redundant code Will Newton
2008-08-12 14:39 ` [PATCH 04/11] fsl_usb2_udc: Clean up whitespace in errors and warnings Will Newton
2008-08-12 14:39 ` [PATCH 05/11] fsl_usb2_udc: Clean up whitespace in /proc debugging output Will Newton
2008-08-12 14:39 ` [PATCH 06/11] fsl_usb2_udc: Initialize spinlock earlier Will Newton
2008-08-12 14:39 ` [PATCH 07/11] fsl_usb2_udc: Rename the arguments of the fsl_writel macro Will Newton
2008-08-12 14:39 ` [PATCH 08/11] fsl_usb2_udc: Uninline udc_reset_ep_queue Will Newton
2008-08-12 14:39 ` [PATCH 09/11] fsl_usb2_udc: Make fsl_queue_td return type void Will Newton
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=1216135490-21656-10-git-send-email-will.newton@imgtec.com \
--to=will.newton@imgtec.com \
--cc=gregkh@suse.de \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tanya.jiang@freescale.com \
--cc=will.newton@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
all inboxes | Powered by JetHome®