Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753402AbcKLWEh (ORCPT ); Sat, 12 Nov 2016 17:04:37 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:35437 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbcKLWEf (ORCPT ); Sat, 12 Nov 2016 17:04:35 -0500 From: Walt Feasel To: markh@compro.net Cc: lidza.louina@gmail.com, gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Walt Feasel Subject: [PATCH] [STYLE 2/2]staging:dgnc:dgnc_neo.c block comment modifications Date: Sat, 12 Nov 2016 17:04:24 -0500 Message-Id: <1478988264-8343-1-git-send-email-waltfeasel@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3997 Lines: 131 Modified block comments for style consistency Signed-off-by: Walt Feasel --- drivers/staging/dgnc/dgnc_neo.c | 48 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 03fc58e..df180a7 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -617,9 +617,8 @@ static void neo_param(struct tty_struct *tty) if (!bd || bd->magic != DGNC_BOARD_MAGIC) return; - /* - * 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) { ch->ch_r_head = 0; ch->ch_r_tail = 0; @@ -680,7 +679,8 @@ static void neo_param(struct tty_struct *tty) 4800, 9600, 19200, 38400 } }; - /* Only use the TXPrint baud rate if the terminal unit + /* + * Only use the TXPrint baud rate if the terminal unit * is NOT open */ if (!(ch->ch_tun.un_flags & UN_ISOPEN) && @@ -805,7 +805,8 @@ static void neo_param(struct tty_struct *tty) if (ch->ch_digi.digi_flags & CTSPACE || ch->ch_c_cflag & CRTSCTS) { neo_set_cts_flow_control(ch); } else if (ch->ch_c_iflag & IXON) { - /* If start/stop is set to disable, then we should + /* + * If start/stop is set to disable, then we should * disable flow control */ if ((ch->ch_startc == _POSIX_VDISABLE) || @@ -820,7 +821,8 @@ static void neo_param(struct tty_struct *tty) if (ch->ch_digi.digi_flags & RTSPACE || ch->ch_c_cflag & CRTSCTS) { neo_set_rts_flow_control(ch); } else if (ch->ch_c_iflag & IXOFF) { - /* If start/stop is set to disable, then we should + /* + * If start/stop is set to disable, then we should * disable flow control */ if ((ch->ch_startc == _POSIX_VDISABLE) || @@ -1246,10 +1248,10 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM); } - /* - * Discard character if we are ignoring the error mask. - */ - if (linestatus & error_mask) { + + /* Discard character if we are ignoring the error mask. */ + +if (linestatus & error_mask) { unsigned char discard; linestatus = 0; @@ -1287,9 +1289,8 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) ch->ch_rxcount++; } - /* - * Write new final heads to channel structure. - */ + /* Write new final heads to channel structure. */ + ch->ch_r_head = head & RQUEUEMASK; ch->ch_e_head = head & EQUEUEMASK; @@ -1466,9 +1467,9 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch) goto exit_unlock; } - /* - * We have to do it this way, because of the EXAR TXFIFO count bug. - */ + + /* We have to do it this way, because of the EXAR TXFIFO count bug. */ + if ((ch->ch_bd->dvid & 0xf0) < UART_XR17E158_DVID) { if (!(ch->ch_flags & (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM))) goto exit_unlock; @@ -1653,9 +1654,8 @@ static void neo_send_stop_character(struct channel_t *ch) } } -/* - * neo_uart_init - */ +/* neo_uart_init */ + static void neo_uart_init(struct channel_t *ch) { writeb(0, &ch->ch_neo_uart->ier); @@ -1676,9 +1676,8 @@ static void neo_uart_init(struct channel_t *ch) neo_pci_posting_flush(ch->ch_bd); } -/* - * Make the UART completely turn off. - */ +/* Make the UART completely turn off. */ + static void neo_uart_off(struct channel_t *ch) { /* Turn off UART enhanced bits */ @@ -1713,9 +1712,8 @@ static uint neo_get_uart_bytes_left(struct channel_t *ch) /* Channel lock MUST be held by the calling function! */ static void neo_send_break(struct channel_t *ch, int msecs) { - /* - * If we receive a time of 0, this means turn off the break. - */ + /* If we receive a time of 0, this means turn off the break. */ + if (msecs == 0) { if (ch->ch_flags & CH_BREAK_SENDING) { unsigned char temp = readb(&ch->ch_neo_uart->lcr); -- 2.1.4