mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 01/11] staging: dgnc: remove unused variables
@ 2015-10-03 15:22 Sudip Mukherjee
  2015-10-03 15:22 ` [PATCH 02/11] staging: dgnc: remove multiple blank lines Sudip Mukherjee
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Sudip Mukherjee @ 2015-10-03 15:22 UTC (permalink / raw)
  To: Lidza Louina, Mark Hounschell, Greg Kroah-Hartman
  Cc: linux-kernel, driverdev-devel, devel, Sudip Mukherjee

These variables were only assigned some values but were never used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/dgnc/dgnc_cls.c |  4 +---
 drivers/staging/dgnc/dgnc_tty.c | 11 ++---------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index 76fe4b2..24fc28c 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -854,10 +854,8 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
 		 * Discard character if we are ignoring the error mask.
 		*/
 		if (linestatus & error_mask)  {
-			unsigned char discard;
-
 			linestatus = 0;
-			discard = readb(&ch->ch_cls_uart->txrx);
+			readb(&ch->ch_cls_uart->txrx);
 			continue;
 		}
 
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index fbfe79a..45f98db 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1349,12 +1349,10 @@ static void dgnc_tty_hangup(struct tty_struct *tty)
  */
 static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
 {
-	struct ktermios *ts;
 	struct dgnc_board *bd;
 	struct channel_t *ch;
 	struct un_t *un;
 	unsigned long flags;
-	int rc = 0;
 
 	if (!tty || tty->magic != TTY_MAGIC)
 		return;
@@ -1371,8 +1369,6 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return;
 
-	ts = &tty->termios;
-
 	spin_lock_irqsave(&ch->ch_lock, flags);
 
 	/*
@@ -1434,7 +1430,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
 		/* wait for output to drain */
 		/* This will also return if we take an interrupt */
 
-		rc = bd->bd_ops->drain(tty, 0);
+		bd->bd_ops->drain(tty, 0);
 
 		dgnc_tty_flush_buffer(tty);
 		tty_ldisc_flush(tty);
@@ -1685,7 +1681,6 @@ static int dgnc_tty_write(struct tty_struct *tty,
 	struct channel_t *ch = NULL;
 	struct un_t *un = NULL;
 	int bufcount = 0, n = 0;
-	int orig_count = 0;
 	unsigned long flags;
 	ushort head;
 	ushort tail;
@@ -1711,7 +1706,6 @@ static int dgnc_tty_write(struct tty_struct *tty,
 	 * This helps to figure out if we should ask the FEP
 	 * to send us an event when it has more space available.
 	 */
-	orig_count = count;
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 
@@ -1979,7 +1973,6 @@ static void dgnc_tty_wait_until_sent(struct tty_struct *tty, int timeout)
 	struct dgnc_board *bd;
 	struct channel_t *ch;
 	struct un_t *un;
-	int rc;
 
 	if (!tty || tty->magic != TTY_MAGIC)
 		return;
@@ -1996,7 +1989,7 @@ static void dgnc_tty_wait_until_sent(struct tty_struct *tty, int timeout)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return;
 
-	rc = bd->bd_ops->drain(tty, 0);
+	bd->bd_ops->drain(tty, 0);
 }
 
 
-- 
1.9.1


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

end of thread, other threads:[~2015-10-04  8:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03 15:22 [PATCH 01/11] staging: dgnc: remove unused variables Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 02/11] staging: dgnc: remove multiple blank lines Sudip Mukherjee
2015-10-04  8:31   ` Greg Kroah-Hartman
2015-10-03 15:22 ` [PATCH 03/11] staging: dgnc: remove blankline before brace Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 04/11] staging: dgnc: remove blankline after brace Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 05/11] staging: dgnc: remove space after cast Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 06/11] staging: dgnc: change style of NULL comparison Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 07/11] staging: dgnc: alignment style Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 08/11] staging: dgnc: remove NULL test Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 09/11] staging: dgnc: remove parenthesis Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 10/11] staging: dgnc: remove initialization of global Sudip Mukherjee
2015-10-03 15:22 ` [PATCH 11/11] staging: dgnc: remove dgnc_init_globals function Sudip Mukherjee

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

Powered by JetHome