* [PATCH] staging: dgap: dgap: Removed variables that is never used
@ 2015-01-28 22:40 Rickard Strandqvist
0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2015-01-28 22:40 UTC (permalink / raw)
To: Lidza Louina, Mark Hounschell
Cc: Rickard Strandqvist, Daeseok Youn, Greg Kroah-Hartman,
driverdev-devel, 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/dgap/dgap.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index bdb5317..f8a8c0a 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -3715,7 +3715,7 @@ static int dgap_tty_write(struct tty_struct *tty, const unsigned char *buf,
} else {
dgap_wmove(ch, ch->ch_digi.digi_offstr,
(int) ch->ch_digi.digi_offlen);
- head = readw(&(bs->tx_head)) & tmask;
+ readw(&(bs->tx_head)) & tmask;
ch->ch_flags &= ~CH_PRON;
}
}
@@ -4586,7 +4586,6 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file)
*/
static void dgap_tty_close(struct tty_struct *tty, struct file *file)
{
- struct ktermios *ts;
struct board_t *bd;
struct channel_t *ch;
struct un_t *un;
@@ -4607,8 +4606,6 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
if (!bd || bd->magic != DGAP_BOARD_MAGIC)
return;
- ts = &tty->termios;
-
spin_lock_irqsave(&ch->ch_lock, lock_flags);
/*
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-29 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 22:40 [PATCH] staging: dgap: dgap: Removed variables that is never used Rickard Strandqvist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).