public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used
@ 2015-01-28 22:42 Rickard Strandqvist
  2015-01-29  2:37 ` Chris Rorvick
  0 siblings, 1 reply; 8+ messages in thread
From: Rickard Strandqvist @ 2015-01-28 22:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Vincenzo Scotti
  Cc: Rickard Strandqvist, Roberta Dobrescu, Sachin Kamat, Simon Horman,
	Ebru Akagunduz, Magnus Damm, devel, linux-kernel

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/staging/emxx_udc/emxx_udc.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index eb178fc..b916fab 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -2974,10 +2974,10 @@ static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
 	spin_lock_irqsave(&udc->lock, flags);
 
 	if (ep->epnum == 0) {
-		data = _nbu2ss_readl(&preg->EP0_LENGTH) & EP0_LDATA;
+		_nbu2ss_readl(&preg->EP0_LENGTH) & EP0_LDATA;
 
 	} else {
-		data = _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_LEN_DCNT)
+		_nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_LEN_DCNT)
 			& EPn_LDATA;
 	}
 
@@ -3264,12 +3264,11 @@ static void __init nbu2ss_drv_set_ep_info(
 	if (isdigit(name[2])) {
 
 		long	num;
-		int	res;
 		char	tempbuf[2];
 
 		tempbuf[0] = name[2];
 		tempbuf[1] = '\0';
-		res = kstrtol(tempbuf, 16, &num);
+		kstrtol(tempbuf, 16, &num);
 
 		if (num == 0)
 			ep->ep.maxpacket = EP0_PACKETSIZE;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-30 23:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 22:42 [PATCH] staging: emxx_udc: emxx_udc: Removed variables that is never used Rickard Strandqvist
2015-01-29  2:37 ` Chris Rorvick
2015-01-29 21:52   ` Rickard Strandqvist
2015-01-29 23:46     ` Chris Rorvick
2015-01-30  1:58       ` Chris Rorvick
2015-01-30 14:20         ` Dan Carpenter
2015-01-30 17:35           ` Rickard Strandqvist
2015-01-30 23:21             ` Chris Rorvick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox