Commit 587abd7b authored by Seunghun Lee's avatar Seunghun Lee Committed by Greg Kroah-Hartman

staging: dgnc: split two assignments into the two assignments on two lines.

split two assignments into the two assignments on two lines.

CC: Lidza Louina <lidza.louina@gmail.com>
CC: Mark Hounschell <markh@compro.net>
Signed-off-by: default avatarSeunghun Lee <waydi1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 239d1346
* checkpatch fixes * checkpatch fixes
* split two assignments into the two assignments on two lines;
don't use two equals signs
* remove unecessary comments * remove unecessary comments
* remove unecessary error messages. Example kzalloc() has its * remove unecessary error messages. Example kzalloc() has its
own error message. Adding an extra one is useless. own error message. Adding an extra one is useless.
......
...@@ -493,9 +493,12 @@ static void cls_param(struct tty_struct *tty) ...@@ -493,9 +493,12 @@ static void cls_param(struct tty_struct *tty)
* If baud rate is zero, flush queues, and set mval to drop DTR. * If baud rate is zero, flush queues, and set mval to drop DTR.
*/ */
if ((ch->ch_c_cflag & (CBAUD)) == 0) { if ((ch->ch_c_cflag & (CBAUD)) == 0) {
ch->ch_r_head = ch->ch_r_tail = 0; ch->ch_r_head = 0;
ch->ch_e_head = ch->ch_e_tail = 0; ch->ch_r_tail = 0;
ch->ch_w_head = ch->ch_w_tail = 0; ch->ch_e_head = 0;
ch->ch_e_tail = 0;
ch->ch_w_head = 0;
ch->ch_w_tail = 0;
cls_flush_uart_write(ch); cls_flush_uart_write(ch);
cls_flush_uart_read(ch); cls_flush_uart_read(ch);
...@@ -627,7 +630,8 @@ static void cls_param(struct tty_struct *tty) ...@@ -627,7 +630,8 @@ static void cls_param(struct tty_struct *tty)
break; break;
} }
ier = uart_ier = readb(&ch->ch_cls_uart->ier); uart_ier = readb(&ch->ch_cls_uart->ier);
ier = uart_ier;
uart_lcr = readb(&ch->ch_cls_uart->lcr); uart_lcr = readb(&ch->ch_cls_uart->lcr);
if (baud == 0) if (baud == 0)
...@@ -915,7 +919,8 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch) ...@@ -915,7 +919,8 @@ static void cls_copy_data_from_uart_to_queue(struct channel_t *ch)
* I hope thats okay with everyone? Yes? Good. * I hope thats okay with everyone? Yes? Good.
*/ */
while (qleft < 1) { while (qleft < 1) {
ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK; tail = (tail + 1) & RQUEUEMASK;
ch->ch_r_tail = tail;
ch->ch_err_overrun++; ch->ch_err_overrun++;
qleft++; qleft++;
} }
......
...@@ -410,14 +410,16 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) ...@@ -410,14 +410,16 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
unsigned long flags; unsigned long flags;
/* get the board structure and prep it */ /* get the board structure and prep it */
brd = dgnc_Board[dgnc_NumBoards] = dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(*brd), GFP_KERNEL);
kzalloc(sizeof(*brd), GFP_KERNEL); brd = dgnc_Board[dgnc_NumBoards];
if (!brd) if (!brd)
return -ENOMEM; return -ENOMEM;
/* make a temporary message buffer for the boot messages */ /* make a temporary message buffer for the boot messages */
brd->msgbuf = brd->msgbuf_head = brd->msgbuf_head = kzalloc(sizeof(u8) * 8192, GFP_KERNEL);
kzalloc(sizeof(u8) * 8192, GFP_KERNEL); brd->msgbuf = brd->msgbuf_head;
if (!brd->msgbuf) { if (!brd->msgbuf) {
kfree(brd); kfree(brd);
return -ENOMEM; return -ENOMEM;
......
...@@ -626,9 +626,12 @@ static void neo_param(struct tty_struct *tty) ...@@ -626,9 +626,12 @@ static void neo_param(struct tty_struct *tty)
* If baud rate is zero, flush queues, and set mval to drop DTR. * If baud rate is zero, flush queues, and set mval to drop DTR.
*/ */
if ((ch->ch_c_cflag & (CBAUD)) == 0) { if ((ch->ch_c_cflag & (CBAUD)) == 0) {
ch->ch_r_head = ch->ch_r_tail = 0; ch->ch_r_head = 0;
ch->ch_e_head = ch->ch_e_tail = 0; ch->ch_r_tail = 0;
ch->ch_w_head = ch->ch_w_tail = 0; ch->ch_e_head = 0;
ch->ch_e_tail = 0;
ch->ch_w_head = 0;
ch->ch_w_tail = 0;
neo_flush_uart_write(ch); neo_flush_uart_write(ch);
neo_flush_uart_read(ch); neo_flush_uart_read(ch);
...@@ -754,7 +757,9 @@ static void neo_param(struct tty_struct *tty) ...@@ -754,7 +757,9 @@ static void neo_param(struct tty_struct *tty)
break; break;
} }
ier = uart_ier = readb(&ch->ch_neo_uart->ier); uart_ier = readb(&ch->ch_neo_uart->ier);
ier = uart_ier;
uart_lcr = readb(&ch->ch_neo_uart->lcr); uart_lcr = readb(&ch->ch_neo_uart->lcr);
if (baud == 0) if (baud == 0)
...@@ -1285,7 +1290,8 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) ...@@ -1285,7 +1290,8 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
* I hope thats okay with everyone? Yes? Good. * I hope thats okay with everyone? Yes? Good.
*/ */
while (qleft < 1) { while (qleft < 1) {
ch->ch_r_tail = tail = (tail + 1) & RQUEUEMASK; tail = (tail + 1) & RQUEUEMASK;
ch->ch_r_tail = tail;
ch->ch_err_overrun++; ch->ch_err_overrun++;
qleft++; qleft++;
} }
......
...@@ -1293,9 +1293,12 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) ...@@ -1293,9 +1293,12 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file)
/* /*
* Flush input queues. * Flush input queues.
*/ */
ch->ch_r_head = ch->ch_r_tail = 0; ch->ch_r_head = 0;
ch->ch_e_head = ch->ch_e_tail = 0; ch->ch_r_tail = 0;
ch->ch_w_head = ch->ch_w_tail = 0; ch->ch_e_head = 0;
ch->ch_e_tail = 0;
ch->ch_w_head = 0;
ch->ch_w_tail = 0;
brd->bd_ops->flush_uart_write(ch); brd->bd_ops->flush_uart_write(ch);
brd->bd_ops->flush_uart_read(ch); brd->bd_ops->flush_uart_read(ch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment