Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550190 > unrolled thread

[PATCH v2] USB: cypress_m8: remove unused variable

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2017-01-03 22:10 +0100
Last post2017-01-16 12:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] USB: cypress_m8: remove unused variable Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2017-01-03 22:10 +0100
    Re: [PATCH v2] USB: cypress_m8: remove unused variable Johan Hovold <johan@kernel.org> - 2017-01-16 12:30 +0100

#1550190 — [PATCH v2] USB: cypress_m8: remove unused variable

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2017-01-03 22:10 +0100
Subject[PATCH v2] USB: cypress_m8: remove unused variable
Message-ID<sVEvg-3xp-31@gated-at.bofh.it>
From: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>

The variable havedata was only being set but never used afterwards.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

v2: changed the from line

 drivers/usb/serial/cypress_m8.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index bbeeb2b..90110de 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1069,7 +1069,6 @@ static void cypress_read_int_callback(struct urb *urb)
 	unsigned char *data = urb->transfer_buffer;
 	unsigned long flags;
 	char tty_flag = TTY_NORMAL;
-	int havedata = 0;
 	int bytes = 0;
 	int result;
 	int i = 0;
@@ -1118,16 +1117,12 @@ static void cypress_read_int_callback(struct urb *urb)
 		priv->current_status = data[0] & 0xF8;
 		bytes = data[1] + 2;
 		i = 2;
-		if (bytes > 2)
-			havedata = 1;
 		break;
 	case packet_format_2:
 		/* This is for the CY7C63743... */
 		priv->current_status = data[0] & 0xF8;
 		bytes = (data[0] & 0x07) + 1;
 		i = 1;
-		if (bytes > 1)
-			havedata = 1;
 		break;
 	}
 	spin_unlock_irqrestore(&priv->lock, flags);
-- 
1.9.1

[toc] | [next] | [standalone]


#1559653

FromJohan Hovold <johan@kernel.org>
Date2017-01-16 12:30 +0100
Message-ID<t0dE7-88J-25@gated-at.bofh.it>
In reply to#1550190
On Tue, Jan 03, 2017 at 09:01:10PM +0000, Sudip Mukherjee wrote:
> From: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> 
> The variable havedata was only being set but never used afterwards.
> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> 
> v2: changed the from line

Now applied, thanks.

Johan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web