瀏覽代碼

Char: moxa, remove unused variables

drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read
        port = tty->index;
        ^      ~~~~~~~~~~
drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read
        cflag = termio->c_cflag;        /* termio->c_cflag */
        ^       ~~~~~~~~~~~~~~~

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jiri Slaby 14 年之前
父節點
當前提交
9d86f71b59
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      drivers/tty/moxa.c

+ 0 - 4
drivers/tty/moxa.c

@@ -1281,10 +1281,8 @@ static int moxa_tiocmset(struct tty_struct *tty,
 			 unsigned int set, unsigned int clear)
 {
 	struct moxa_port *ch;
-	int port;
 	int dtr, rts;
 
-	port = tty->index;
 	mutex_lock(&moxa_openlock);
 	ch = tty->driver_data;
 	if (!ch) {
@@ -1756,11 +1754,9 @@ static int MoxaPortSetTermio(struct moxa_port *port, struct ktermios *termio,
 		speed_t baud)
 {
 	void __iomem *ofsAddr;
-	tcflag_t cflag;
 	tcflag_t mode = 0;
 
 	ofsAddr = port->tableAddr;
-	cflag = termio->c_cflag;	/* termio->c_cflag */
 
 	mode = termio->c_cflag & CSIZE;
 	if (mode == CS5)