Re: [PATCH 072/141] usb: musb: gadget: kill unreachable code in musb_g_rx()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 24, 2010 at 11:50:40AM -0500, Greg KH wrote:
On Sun, Oct 24, 2010 at 06:39:01PM +0400, Sergei Shtylyov wrote:
Hello.

On 24-10-2010 14:11, Felipe Balbi wrote:

Well, I've just remembered that I've submitted two patches killing
unreachable code, and this was patch 2/2 IIRC. Felipe, where did patch 1/2 go? I
remember that you've taken it and then posted to the mailing list but what was
its fate after that? :-/

According to [1] Greg had taken it.

[1] http://marc.info/?l=linux-usb&m=128631363625572&w=2

   Greg, looks like you've lost my patch somewhere...

Odd, perhaps it broke the build somehow?

I really don't know, sorry.

If it's still needed, Felipe, can you resend it?

Yes, it's attached to this mail.

Sergei, check if the patch is the correct one.

--
balbi
>From 2a3ac01bf3463861692ca6763f53f31c03da6948 Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 13:44:12 +0300
Subject: [PATCH] usb: musb: gadget: kill unreachable code in musb_g_rx()
Organization: Texas Instruments\n

musb_g_rx() always returns if next_request() call yields NULL, so the DBG()
near the function's end can never be invoked. Remove it along with unneeded
'return'; also remove the duplicate 'request' check...

Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/usb/musb/musb_gadget.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 36968fc..33243aa 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -775,7 +775,7 @@ void musb_g_rx(struct musb *musb, u8 epnum)
 		musb_writew(epio, MUSB_RXCSR, csr);
 
 		DBG(3, "%s iso overrun on %p\n", musb_ep->name, request);
-		if (request && request->status == -EINPROGRESS)
+		if (request->status == -EINPROGRESS)
 			request->status = -EOVERFLOW;
 	}
 	if (csr & MUSB_RXCSR_INCOMPRX) {
@@ -828,14 +828,8 @@ void musb_g_rx(struct musb *musb, u8 epnum)
 			return;
 	}
 
-	/* analyze request if the ep is hot */
-	if (request)
-		rxstate(musb, to_musb_request(request));
-	else
-		DBG(3, "packet waiting for %s%s request\n",
-				musb_ep->desc ? "" : "inactive ",
-				musb_ep->end_point.name);
-	return;
+	/* Analyze request */
+	rxstate(musb, to_musb_request(request));
 }
 
 /* ------------------------------------------------------------ */
-- 
1.7.3.1.127.g1bb28


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux