[PATCH] staging: dgnc: Fix lines longer than 80 characters
For the first lines of the patch, I opted to create a small function instead of breaking the the line in a weird way. The other changes are simple ones. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_tty.c | 42 + 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index af4bc86..835d448 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -102,6 +102,7 @@ static int dgnc_tty_write(struct tty_struct *tty, const unsigned char *buf, static void dgnc_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned char line); static const struct tty_operations dgnc_tty_ops = { .open = dgnc_tty_open, @@ -786,6 +787,12 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) } } +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned char line) +{ + ch->ch_mostat &= ~(line); + ch->ch_bd->bd_ops->assert_modem_signals(ch); +} + void dgnc_wakeup_writes(struct channel_t *ch) { int qlen = 0; @@ -823,19 +830,15 @@ void dgnc_wakeup_writes(struct channel_t *ch) * If RTS Toggle mode is on, whenever * the queue and UART is empty, keep RTS low. */ - if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_RTS); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) + dgnc_keep_line_low(ch, UART_MCR_RTS); /* * If DTR Toggle mode is on, whenever * the queue and UART is empty, keep DTR low. */ - if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_DTR); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) + dgnc_keep_line_low(ch, UART_MCR_DTR); } } @@ -969,8 +972,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) * touched safely, the close routine will signal the * ch_flags_wait to wake us back up. */ - rc = wait_event_interruptible(ch->ch_flags_wait, (((ch->ch_tun.un_flags | - ch->ch_pun.un_flags) & UN_CLOSING) == 0)); + rc = wait_event_interruptible(ch->ch_flags_wait, + (((ch->ch_tun.un_flags | + ch->ch_pun.un_flags) & UN_CLOSING) == 0)); /* If ret is non-zero, user ctrl-c'ed us */ if (rc) @@ -1188,11 +1192,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty, */ if (sleep_on_un_flags) retval = wait_event_interruptible - (un->un_flags_wait, (old_flags != (ch->ch_tun.un_flags | - ch->ch_pun.un_flags))); + (un->un_flags_wait, +(old_flags != (ch->ch_tun.un_flags | + ch->ch_pun.un_flags))); else retval = wait_event_interruptible(ch->ch_flags_wait, - (old_flags != ch->ch_flags)); + (old_flags != ch->ch_flags)); /* * We got woken up for some reason. @@ -2511,13 +2516,15 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, if (ch->ch_tun.un_flags & (UN_LOW | UN_EMPTY)) { ch->ch_tun.un_flags &= ~(UN_LOW | UN_EMPTY); - wake_up_interruptible(&ch->ch_tun.un_flags_wait); + wake_up_interruptible(&ch->ch_tun + .un_flags_wait); } if (ch->ch_pun
[PATCH] staging: dgnc: fix unnamed parameter
This patch fixes a checkpatch warning. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_tty.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.h b/drivers/staging/dgnc/dgnc_tty.h index 85a1310..1ee0eee 100644 --- a/drivers/staging/dgnc/dgnc_tty.h +++ b/drivers/staging/dgnc/dgnc_tty.h @@ -21,9 +21,9 @@ intdgnc_tty_register(struct dgnc_board *brd); void dgnc_tty_unregister(struct dgnc_board *brd); -int dgnc_tty_init(struct dgnc_board *); +int dgnc_tty_init(struct dgnc_board *brd); -void dgnc_cleanup_tty(struct dgnc_board *); +void dgnc_cleanup_tty(struct dgnc_board *brd); void dgnc_input(struct channel_t *ch); void dgnc_carrier(struct channel_t *ch); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Fix lines longer than 80 characters
On Sat, Dec 03, 2016 at 09:51:13AM +0100, Greg KH wrote: > On Fri, Dec 02, 2016 at 08:13:49PM +0100, Fernando Apesteguia wrote: > > For the first lines of the patch, I opted to create a small function > > instead of breaking the the line in a weird way. > > > > The other changes are simple ones. > > > > Signed-off-by: Fernando Apesteguia > > --- > > drivers/staging/dgnc/dgnc_tty.c | 42 > > + > > 1 file changed, 26 insertions(+), 16 deletions(-) > > > > diff --git a/drivers/staging/dgnc/dgnc_tty.c > > b/drivers/staging/dgnc/dgnc_tty.c > > index af4bc86..835d448 100644 > > --- a/drivers/staging/dgnc/dgnc_tty.c > > +++ b/drivers/staging/dgnc/dgnc_tty.c > > @@ -102,6 +102,7 @@ static int dgnc_tty_write(struct tty_struct *tty, const > > unsigned char *buf, > > static void dgnc_tty_set_termios(struct tty_struct *tty, > > struct ktermios *old_termios); > > static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); > > +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned char > > line); > > > > static const struct tty_operations dgnc_tty_ops = { > > .open = dgnc_tty_open, > > @@ -786,6 +787,12 @@ void dgnc_check_queue_flow_control(struct channel_t > > *ch) > > } > > } > > > > +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned char > > line) > > +{ > > + ch->ch_mostat &= ~(line); > > + ch->ch_bd->bd_ops->assert_modem_signals(ch); > > +} > > Your name here is odd, it is named because of what it does to the coding > style, not to the logic of what is happening in the function itself, > making it very confusing. It was a bad choice indeed :) but I didn't mean anything about the coding style but about what the fuction does. It was meant to be read as: "keep_signal_low" since the function puts (RTS/DTR) UART "line" to low. Would "keep_signal_low" be clear and representative of what the function does? > > Yes, naming is hard, one of the hardest things in programming. Indeed! Thanks! > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Fix lines longer than 80 characters
On Sat, Dec 03, 2016 at 11:11:23AM +0100, Greg KH wrote: > On Sat, Dec 03, 2016 at 10:56:54AM +0100, Fernando Apesteguia wrote: > > On Sat, Dec 03, 2016 at 09:51:13AM +0100, Greg KH wrote: > > > On Fri, Dec 02, 2016 at 08:13:49PM +0100, Fernando Apesteguia wrote: > > > > For the first lines of the patch, I opted to create a small function > > > > instead of breaking the the line in a weird way. > > > > > > > > The other changes are simple ones. > > > > > > > > Signed-off-by: Fernando Apesteguia > > > > --- > > > > drivers/staging/dgnc/dgnc_tty.c | 42 > > > > + > > > > 1 file changed, 26 insertions(+), 16 deletions(-) > > > > > > > > diff --git a/drivers/staging/dgnc/dgnc_tty.c > > > > b/drivers/staging/dgnc/dgnc_tty.c > > > > index af4bc86..835d448 100644 > > > > --- a/drivers/staging/dgnc/dgnc_tty.c > > > > +++ b/drivers/staging/dgnc/dgnc_tty.c > > > > @@ -102,6 +102,7 @@ static int dgnc_tty_write(struct tty_struct *tty, > > > > const unsigned char *buf, > > > > static void dgnc_tty_set_termios(struct tty_struct *tty, > > > > struct ktermios *old_termios); > > > > static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); > > > > +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned > > > > char line); > > > > > > > > static const struct tty_operations dgnc_tty_ops = { > > > > .open = dgnc_tty_open, > > > > @@ -786,6 +787,12 @@ void dgnc_check_queue_flow_control(struct > > > > channel_t *ch) > > > > } > > > > } > > > > > > > > +static void dgnc_keep_line_low(struct channel_t *ch, const unsigned > > > > char line) > > > > +{ > > > > + ch->ch_mostat &= ~(line); > > > > + ch->ch_bd->bd_ops->assert_modem_signals(ch); > > > > +} > > > > > > Your name here is odd, it is named because of what it does to the coding > > > style, not to the logic of what is happening in the function itself, > > > making it very confusing. > > > > It was a bad choice indeed :) but I didn't mean anything about the coding > > style but about what the fuction does. It was meant to be read as: > > "keep_signal_low" since the function puts (RTS/DTR) UART "line" to low. > > > > Would "keep_signal_low" be clear and representative of what the function > > does? > > It's not "keep", it is "change", right? I don't remember the context > now, sorry, you could be correct... Yes, I think "change" or even "set" would be more appropriate. I'll rework the patch and send it again. Thanks. > > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2] staging: dgnc: Fix lines longer than 80 characters
For the first lines of the patch, I opted to create a small function instead of breaking the the line in a weird way. This is v2 of the patch with the name of the function changed from v1 The other changes are simple ones. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_tty.c | 42 + 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index af4bc86..557b566 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -102,6 +102,7 @@ static int dgnc_tty_write(struct tty_struct *tty, const unsigned char *buf, static void dgnc_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); +static void dgnc_set_signal_low(struct channel_t *ch, const unsigned char line); static const struct tty_operations dgnc_tty_ops = { .open = dgnc_tty_open, @@ -786,6 +787,12 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) } } +static void dgnc_set_signal_low(struct channel_t *ch, const unsigned char sig) +{ + ch->ch_mostat &= ~(sig); + ch->ch_bd->bd_ops->assert_modem_signals(ch); +} + void dgnc_wakeup_writes(struct channel_t *ch) { int qlen = 0; @@ -823,19 +830,15 @@ void dgnc_wakeup_writes(struct channel_t *ch) * If RTS Toggle mode is on, whenever * the queue and UART is empty, keep RTS low. */ - if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_RTS); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) + dgnc_set_signal_low(ch, UART_MCR_RTS); /* * If DTR Toggle mode is on, whenever * the queue and UART is empty, keep DTR low. */ - if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_DTR); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) + dgnc_set_signal_low(ch, UART_MCR_DTR); } } @@ -969,8 +972,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) * touched safely, the close routine will signal the * ch_flags_wait to wake us back up. */ - rc = wait_event_interruptible(ch->ch_flags_wait, (((ch->ch_tun.un_flags | - ch->ch_pun.un_flags) & UN_CLOSING) == 0)); + rc = wait_event_interruptible(ch->ch_flags_wait, + (((ch->ch_tun.un_flags | + ch->ch_pun.un_flags) & UN_CLOSING) == 0)); /* If ret is non-zero, user ctrl-c'ed us */ if (rc) @@ -1188,11 +1192,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty, */ if (sleep_on_un_flags) retval = wait_event_interruptible - (un->un_flags_wait, (old_flags != (ch->ch_tun.un_flags | - ch->ch_pun.un_flags))); + (un->un_flags_wait, +(old_flags != (ch->ch_tun.un_flags | + ch->ch_pun.un_flags))); else retval = wait_event_interruptible(ch->ch_flags_wait, - (old_flags != ch->ch_flags)); + (old_flags != ch->ch_flags)); /* * We got woken up for some reason. @@ -2511,13 +2516,15 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, if (ch->ch_tun.un_flags & (UN_LOW | UN_EMPTY)) { ch->ch_tun.un_flags &= ~(UN_LOW | UN_EMPTY); - wake_up_interruptible(&ch->ch_tun.un_flags_wait); + wake_up_interruptible(&ch->ch_tun + .un_flags_wait
Re: [PATCH V2] staging: dgnc: Fix lines longer than 80 characters
On Tue, Dec 06, 2016 at 10:12:56AM +0100, Greg KH wrote: > On Sun, Dec 04, 2016 at 08:41:04PM +0100, Fernando Apesteguia wrote: > > For the first lines of the patch, I opted to create a small function > > instead of breaking the the line in a weird way. > > > > This is v2 of the patch with the name of the function changed from > > v1 > > This goes below the --- line. > > > > > The other changes are simple ones. > > What does that mean? Please always be specific. I'll rework the patch. Thanks. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V3] staging: dgnc: Fix lines longer than 80 characters
For two cases (beginning and end of the patch) I opted to create small functions instead of breaking the the lines in a weird way. The other changes are simple ones: either by breaking the line when appropriate or by turning a comment into a multi-line one. Signed-off-by: Fernando Apesteguia --- Changes from V2 include the addition of a new function to wake up processes waiting in a printer/terminal unit. This avoids code duplication and reduces line length. drivers/staging/dgnc/dgnc_tty.c | 64 + 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index af4bc86..37795a0 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -102,6 +102,8 @@ static int dgnc_tty_write(struct tty_struct *tty, const unsigned char *buf, static void dgnc_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); +static void dgnc_set_signal_low(struct channel_t *ch, const unsigned char line); +static void dgnc_wake_up_unit(struct un_t *unit); static const struct tty_operations dgnc_tty_ops = { .open = dgnc_tty_open, @@ -786,6 +788,12 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) } } +static void dgnc_set_signal_low(struct channel_t *ch, const unsigned char sig) +{ + ch->ch_mostat &= ~(sig); + ch->ch_bd->bd_ops->assert_modem_signals(ch); +} + void dgnc_wakeup_writes(struct channel_t *ch) { int qlen = 0; @@ -823,19 +831,15 @@ void dgnc_wakeup_writes(struct channel_t *ch) * If RTS Toggle mode is on, whenever * the queue and UART is empty, keep RTS low. */ - if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_RTS); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE) + dgnc_set_signal_low(ch, UART_MCR_RTS); /* * If DTR Toggle mode is on, whenever * the queue and UART is empty, keep DTR low. */ - if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) { - ch->ch_mostat &= ~(UART_MCR_DTR); - ch->ch_bd->bd_ops->assert_modem_signals(ch); - } + if (ch->ch_digi.digi_flags & DIGI_DTR_TOGGLE) + dgnc_set_signal_low(ch, UART_MCR_DTR); } } @@ -969,8 +973,9 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) * touched safely, the close routine will signal the * ch_flags_wait to wake us back up. */ - rc = wait_event_interruptible(ch->ch_flags_wait, (((ch->ch_tun.un_flags | - ch->ch_pun.un_flags) & UN_CLOSING) == 0)); + rc = wait_event_interruptible(ch->ch_flags_wait, + (((ch->ch_tun.un_flags | + ch->ch_pun.un_flags) & UN_CLOSING) == 0)); /* If ret is non-zero, user ctrl-c'ed us */ if (rc) @@ -1188,11 +1193,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty, */ if (sleep_on_un_flags) retval = wait_event_interruptible - (un->un_flags_wait, (old_flags != (ch->ch_tun.un_flags | - ch->ch_pun.un_flags))); + (un->un_flags_wait, +(old_flags != (ch->ch_tun.un_flags | + ch->ch_pun.un_flags))); else retval = wait_event_interruptible(ch->ch_flags_wait, - (old_flags != ch->ch_flags)); + (old_flags != ch->ch_flags)); /* * We got woken up for some reason. @@ -2326,6 +2332,17 @@ static void dgnc_tty_flush_buffer(struct tty_struct *tty) spin_unlock_irqrestore(&ch->ch_lock, flags); } +/* + * dgnc_wake_up_unit() + * + * Wakes up processes waiting in the unit's (teminal/printer) wait queue + */ +static void dgnc_wake_up_unit(struct un_t *unit) +{ +
[PATCH] staging: dgnc: fix blank line after '{' warnings.
Remove blank lines between open brace and comment. Remove blank lines after comment in line with the rest of the comments of the file. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index af4bc86..8bca929 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -376,9 +376,7 @@ static void dgnc_wmove(struct channel_t *ch, char *buf, uint n) } if (n > 0) { - /* Move rest of data. */ - remain = n; memcpy(ch->ch_wqueue + head, buf, remain); head += remain; @@ -1022,9 +1020,7 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file) /* Initialize if neither terminal or printer is open. */ if (!((ch->ch_tun.un_flags | ch->ch_pun.un_flags) & UN_ISOPEN)) { - /* Flush input queues. */ - ch->ch_r_head = 0; ch->ch_r_tail = 0; ch->ch_e_head = 0; @@ -1623,9 +1619,7 @@ static int dgnc_tty_write(struct tty_struct *tty, } if (n > 0) { - /* Move rest of data. */ - remain = n; memcpy(ch->ch_wqueue + head, buf, remain); head += remain; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: update TODO file
Remove reference to checkpatch warnings since its output is now clean. --- drivers/staging/dgnc/TODO | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/dgnc/TODO b/drivers/staging/dgnc/TODO index 0e0825b..0bdfd26 100644 --- a/drivers/staging/dgnc/TODO +++ b/drivers/staging/dgnc/TODO @@ -1,4 +1,3 @@ -* checkpatch fixes * remove unnecessary comments * remove unnecessary error messages. Example kzalloc() has its own error message. Adding an extra one is useless. -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: Fix multi line comment alignment
Fix alignment in multi line comment block. Remove extra '*' to use the preferred comment style as in Documentation/CodingStyle Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_driver.c | 50 +++--- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index cc6105a..01e948c 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -602,31 +602,31 @@ static void dgnc_do_remap(struct dgnc_board *brd) brd->re_map_membase = ioremap(brd->membase, 0x1000); } -/* -* -* Function: -* -*dgnc_poll_handler -* -* Author: -* -*Scott H Kilau -* -* Parameters: -* -*dummy -- ignored -* -* Return Values: -* -*none -* -* Description: -* -*As each timer expires, it determines (a) whether the "transmit" -*waiter needs to be woken up, and (b) whether the poller needs to -*be rescheduled. -* -**/ +/* + * + * Function: + * + *dgnc_poll_handler + * + * Author: + * + *Scott H Kilau + * + * Parameters: + * + *dummy -- ignored + * + * Return Values: + * + *none + * + * Description: + * + *As each timer expires, it determines (a) whether the "transmit" + *waiter needs to be woken up, and (b) whether the poller needs to + *be rescheduled. + * + */ static void dgnc_poll_handler(ulong dummy) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Fix multi line comment alignment
On Mon, Sep 05, 2016 at 11:45:30PM +0300, Andrey Utkin wrote: > On Mon, Sep 05, 2016 at 08:28:32PM +0200, Fernando Apesteguia wrote: > > Fix alignment in multi line comment block. > > > > Remove extra '*' to use the preferred comment style as in > > Documentation/CodingStyle > > > > Signed-off-by: Fernando Apesteguia > > > > --- > > drivers/staging/dgnc/dgnc_driver.c | 50 > > +++--- > > 1 file changed, 25 insertions(+), 25 deletions(-) > > > > diff --git a/drivers/staging/dgnc/dgnc_driver.c > > b/drivers/staging/dgnc/dgnc_driver.c > > index cc6105a..01e948c 100644 > > --- a/drivers/staging/dgnc/dgnc_driver.c > > +++ b/drivers/staging/dgnc/dgnc_driver.c > > @@ -602,31 +602,31 @@ static void dgnc_do_remap(struct dgnc_board *brd) > > brd->re_map_membase = ioremap(brd->membase, 0x1000); > > } > > > > -/* > > -* > > -* Function: > > -* > > -*dgnc_poll_handler > > -* > > -* Author: > > -* > > -*Scott H Kilau > > -* > > -* Parameters: > > -* > > -*dummy -- ignored > > -* > > -* Return Values: > > -* > > -*none > > -* > > -* Description: > > -* > > -*As each timer expires, it determines (a) whether the "transmit" > > -*waiter needs to be woken up, and (b) whether the poller needs to > > -*be rescheduled. > > -* > > -**/ > > +/* > > + * > > + * Function: > > + * > > + *dgnc_poll_handler > > + * > > + * Author: > > + * > > + *Scott H Kilau > > + * > > + * Parameters: > > + * > > + *dummy -- ignored > > + * > > + * Return Values: > > + * > > + *none > > + * > > + * Description: > > + * > > + *As each timer expires, it determines (a) whether the "transmit" > > + *waiter needs to be woken up, and (b) whether the poller needs to > > + *be rescheduled. > > + * > > + */ > > > > static void dgnc_poll_handler(ulong dummy) > > { > > -- > > 2.7.4 > > Changing first and last lines of that comment should be enough, but all > lines got changed. I'd (re)submit it with just first and last lines > changed. Sorry, but I fail to see how I can align all the lines by changing just the first and last ones. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] [PATCH] staging: dgnc: Fix comment alignment
As reported by checkpatch. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_cls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index 4e1e0dc6..aedca66 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -345,7 +345,7 @@ 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) { linestatus = 0; readb(&ch->ch_cls_uart->txrx); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: Fix lines longer than 80 characters
All the chunks of the patch apply to comments save the first one. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_neo.c | 67 - 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index e794056..5becb37 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -449,7 +449,8 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port) flags); } } else if (cause == UART_17158_XOFF_DETECT) { - if (!(brd->channels[port]->ch_flags & CH_STOP)) { + if (!(brd->channels[port]->ch_flags & + CH_STOP)) { spin_lock_irqsave(&ch->ch_lock, flags); ch->ch_flags |= CH_STOP; @@ -554,7 +555,8 @@ static inline void neo_parse_lsr(struct dgnc_board *brd, uint port) * Rx Oruns. Exar says that an orun will NOT corrupt * the FIFO. It will just replace the holding register * with this new data byte. So basically just ignore this. -* Probably we should eventually have an orun stat in our driver... +* Probably we should eventually have an orun stat in our +* driver... */ ch->ch_err_overrun++; } @@ -949,14 +951,18 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) /* * If 0, no interrupts pending. -* This can happen if the IRQ is shared among a couple Neo/Classic boards. +* This can happen if the IRQ is shared among a couple Neo/Classic +* boards. */ if (!uart_poll) { spin_unlock_irqrestore(&brd->bd_intr_lock, flags); return IRQ_NONE; } - /* At this point, we have at least SOMETHING to service, dig further... */ + /* +* At this point, we have at least SOMETHING to service, dig +* further... +*/ /* Loop on each port */ while ((uart_poll & 0xff) != 0) { @@ -980,7 +986,10 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) ch = brd->channels[port]; neo_copy_data_from_uart_to_queue(ch); - /* Call our tty layer to enforce queue flow control if needed. */ + /* +* Call our tty layer to enforce queue flow control if +* needed. +*/ spin_lock_irqsave(&ch->ch_lock, flags2); dgnc_check_queue_flow_control(ch); spin_unlock_irqrestore(&ch->ch_lock, flags2); @@ -996,16 +1005,18 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) case UART_17158_TXRDY: /* -* TXRDY interrupt clears after reading ISR register for the UART channel. +* TXRDY interrupt clears after reading ISR register +* for the UART channel. */ /* * Yes, this is odd... * Why would I check EVERY possibility of type of * interrupt, when we know its TXRDY??? -* Becuz for some reason, even tho we got triggered for TXRDY, -* it seems to be occasionally wrong. Instead of TX, which -* it should be, I was getting things like RXDY too. Weird. +* Becuz for some reason, even tho we got triggered for +* TXRDY, it seems to be occasionally wrong. Instead of +* TX, which it should be, I was getting things like +* RXDY too. Weird. */ neo_parse_isr(brd, port); break; @@ -1020,8 +1031,8 @@ static irqreturn_t neo_intr(int irq, void *voidbrd) default: /* * The UART triggered us with a bogus interrupt type. -* It appears the Exar chip, when REALLY bogged down, will throw -* these once and awhile. +* It appears the Exar chip, when REALLY bogged down, +* will throw these once and awhile. * Its harmless, just ignore it and move on. */ break; @@ -1239,7 +1250,8 @@ stati
[PATCH] staging: dgnc: replace DGNC_VERIFY_BOARD macro
The patch replaces the macro with a function (dgnc_get_board) and substitutes the macro statement with a call to that function and a comparison on the returned value. This removes a checkpatch warning. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_sysfs.c | 74 +++ 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c index 290bf6e..3ea23a9 100644 --- a/drivers/staging/dgnc/dgnc_sysfs.c +++ b/drivers/staging/dgnc/dgnc_sysfs.c @@ -90,17 +90,21 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver) driver_remove_file(driverfs, &driver_attr_pollrate); } -#define DGNC_VERIFY_BOARD(p, bd) \ - do {\ - if (!p) \ - return 0; \ - \ - bd = dev_get_drvdata(p);\ - if (!bd || bd->magic != DGNC_BOARD_MAGIC) \ - return 0; \ - if (bd->state != BOARD_READY) \ - return 0; \ - } while (0) +static struct dgnc_board *dgnc_get_board(struct device *p) +{ + struct dgnc_board *bd; + + if (!p) + return NULL; + + bd = dev_get_drvdata(p); + if (!bd || bd->magic != DGNC_BOARD_MAGIC) + return NULL; + if (bd->state != BOARD_READY) + return NULL; + + return bd; +} static ssize_t vpd_show(struct device *p, struct device_attribute *attr, char *buf) @@ -109,7 +113,9 @@ static ssize_t vpd_show(struct device *p, struct device_attribute *attr, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; count += sprintf(buf + count, "\n 0 1 2 3 4 5 6 7 8 9 A B C D E F"); @@ -130,7 +136,9 @@ static ssize_t serial_number_show(struct device *p, struct dgnc_board *bd; int count = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; if (bd->serial_num[0] == '\0') count += sprintf(buf + count, "\n"); @@ -148,7 +156,9 @@ static ssize_t ports_state_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count += snprintf(buf + count, PAGE_SIZE - count, @@ -166,7 +176,9 @@ static ssize_t ports_baud_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count += snprintf(buf + count, PAGE_SIZE - count, @@ -184,7 +196,9 @@ static ssize_t ports_msignals_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { struct channel_t *ch = bd->channels[i]; @@ -215,7 +229,9 @@ static ssize_t ports_iflag_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count += snprintf(buf + count, PAGE_SIZE - count, "%d %x\n", @@ -233,7 +249,9 @@ static ssize_t ports_cflag_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count += snprintf(buf + count, PAGE_SIZE - count, "%d %x\n", @@ -251,7 +269,9 @@ static ssize_t ports_oflag_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count += snprintf(buf + count, PAGE_SIZE - count, "%d %x\n", @@ -269,7 +289,9 @@ static ssize_t ports_lflag_show(struct device *p, int count = 0; int i = 0; - DGNC_VERIFY_BOARD(p, bd); + bd = dgnc_get_board(p); + if (!bd) + return 0; for (i = 0; i < bd->nasync; i++) { count
[PATCH] staging: dgnc: Fix lines longer than 80 chars.
Done by either unindenting some comments or converting them to multi line comments. This fixes some checkpatch warnings. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/dgnc_neo.h | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_neo.h b/drivers/staging/dgnc/dgnc_neo.h index abddd48..97f0386 100644 --- a/drivers/staging/dgnc/dgnc_neo.h +++ b/drivers/staging/dgnc/dgnc_neo.h @@ -28,18 +28,20 @@ / struct neo_uart_struct { - u8 txrx;/* WR RHR/THR - Holding Reg */ + u8 txrx;/* WR RHR/THR - Holding Reg */ u8 ier; /* WR IER - Interrupt Enable Reg */ - u8 isr_fcr; /* WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg */ + u8 isr_fcr; /* WR ISR/FCR - Interrupt Status Reg/Fifo +* Control Reg +*/ u8 lcr; /* WR LCR - Line Control Reg */ u8 mcr; /* WR MCR - Modem Control Reg */ u8 lsr; /* WR LSR - Line Status Reg */ u8 msr; /* WR MSR - Modem Status Reg */ u8 spr; /* WR SPR - Scratch Pad Reg */ - u8 fctr;/* WR FCTR - Feature Control Reg */ + u8 fctr;/* WR FCTR - Feature Control Reg */ u8 efr; /* WR EFR - Enhanced Function Reg */ - u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ - u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ + u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ + u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ u8 xonchar1;/* WR XON 1 - Xon Character 1 Reg */ @@ -108,7 +110,9 @@ struct neo_uart_struct { /* 17158 Extended IIR's */ #define UART_17158_IIR_RDI_TIMEOUT 0x0C/* Receiver data TIMEOUT */ #define UART_17158_IIR_XONXOFF 0x10/* Received an XON/XOFF char */ -#define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20/* CTS/DSR or RTS/DTR state change */ +#define UART_17158_IIR_HWFLOW_STATE_CHANGE 0x20/* CTS/DSR or RTS/DTR +* state change +*/ #define UART_17158_IIR_FIFO_ENABLED0xC0/* 16550 FIFOs are Enabled */ /* @@ -119,8 +123,12 @@ struct neo_uart_struct { #define UART_17158_RXRDY_TIMEOUT 0x2 /* RX Ready Timeout */ #define UART_17158_TXRDY 0x3 /* TX Ready */ #define UART_17158_MSR 0x4 /* Modem State Change */ -#define UART_17158_TX_AND_FIFO_CLR 0x40/* Transmitter Holding Reg Empty */ -#define UART_17158_RX_FIFO_DATA_ERROR 0x80/* UART detected an RX FIFO Data error */ +#define UART_17158_TX_AND_FIFO_CLR 0x40/* Transmitter Holding +* Reg Empty +*/ +#define UART_17158_RX_FIFO_DATA_ERROR 0x80/* UART detected an RX FIFO +* Data error +*/ /* * These are the EXTENDED definitions for the 17C158's Interrupt @@ -132,8 +140,12 @@ struct neo_uart_struct { #define UART_17158_EFR_RTSDTR 0x40/* Auto RTS/DTR Flow Control Enable */ #define UART_17158_EFR_CTSDSR 0x80/* Auto CTS/DSR Flow COntrol Enable */ -#define UART_17158_XOFF_DETECT 0x1 /* Indicates whether chip saw an incoming XOFF char */ -#define UART_17158_XON_DETECT 0x2 /* Indicates whether chip saw an incoming XON char */ +#define UART_17158_XOFF_DETECT 0x1 /* Indicates whether chip saw an +* incoming XOFF char +*/ +#define UART_17158_XON_DETECT 0x2 /* Indicates whether chip saw an +* incoming XON char +*/ #define UART_17158_IER_RSVD1 0x10/* Reserved by Exar */ #define UART_17158_IER_XOFF0x20/* Xoff Interrupt Enable */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: Fix multi-line comment alignment
This fixes a checkpatch warning. Also, change the line above so it is aligned to the others in the same block. Signed-off-by: Fernando Apesteguia --- drivers/staging/dgnc/digi.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgnc/digi.h b/drivers/staging/dgnc/digi.h index 5b983e6..4e36573 100644 --- a/drivers/staging/dgnc/digi.h +++ b/drivers/staging/dgnc/digi.h @@ -44,11 +44,11 @@ #define DIGI_SETA (('e' << 8) | 95) /* Set params */ #define DIGI_SETAW (('e' << 8) | 96) /* Drain & set params */ #define DIGI_SETAF (('e' << 8) | 97) /* Drain, flush & set params */ -#define DIGI_GET_NI_INFO (('d' << 8) | 250) /* Non-intelligent state info */ -#define DIGI_LOOPBACK (('d' << 8) | 252) /* - * Enable/disable UART - * internal loopback - */ +#define DIGI_GET_NI_INFO (('d' << 8) | 250)/* Non-intelligent state info */ +#define DIGI_LOOPBACK (('d' << 8) | 252) /* +* Enable/disable UART +* internal loopback +*/ #define DIGI_FAST 0x0002 /* Fast baud rates */ #define RTSPACE0x0004 /* RTS input flow control */ #define CTSPACE0x0008 /* CTS output flow control */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] [staging/silicom] Fixing missing blank line after declarations
Small fix to driver. If these patches are welcomed, more could come in the future. Regards >From d8369cba0552c5ea5f4eadc750434e39785e042a Mon Sep 17 00:00:00 2001 From: Fernando Apesteguia Date: Mon, 5 May 2014 18:16:53 +0200 Subject: [PATCH] [staging/silicom] Fixing missing blank line after declarations --- drivers/staging/silicom/bpctl_mod.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 7f3d884..8fb527b 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -7450,6 +7450,7 @@ static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; + remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir); current_pfs->bypass_entry = NULL; return 0; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] [staging/silicom] Fixing missing blank line after declarations
On Mon, May 05, 2014 at 09:57:48AM -0700, Greg KH wrote: > On Mon, May 05, 2014 at 06:40:13PM +0200, Fernando Apesteguia wrote: > > Small fix to driver. If these patches are welcomed, more could come in the > > future. > > > > Regards > > > >From d8369cba0552c5ea5f4eadc750434e39785e042a Mon Sep 17 00:00:00 2001 > > From: Fernando Apesteguia > > Date: Mon, 5 May 2014 18:16:53 +0200 > > Subject: [PATCH] [staging/silicom] Fixing missing blank line after > > declarations > > > > --- > > drivers/staging/silicom/bpctl_mod.c |1 + > > 1 file changed, 1 insertion(+) > > They would be welcome if they were in a format I could apply them in :) > > See Documentation/SubmittingPatches for the details on how to do this > properly. I think this one is good. > > > > > diff --git a/drivers/staging/silicom/bpctl_mod.c > > b/drivers/staging/silicom/bpctl_mod.c > > index 7f3d884..8fb527b 100644 > > --- a/drivers/staging/silicom/bpctl_mod.c > > +++ b/drivers/staging/silicom/bpctl_mod.c > > @@ -7450,6 +7450,7 @@ static int bypass_proc_remove_dev_sd(struct bpctl_dev > > *pbp_device_block) > > { > > > > struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; > > + > > Why not also delete the empty line above this statement? Hehe, I just wanted to fix "one coding style problem". But this new patch also fixes the first blank line. > > thanks, > > greg k-h --- drivers/staging/silicom/bpctl_mod.c.orig 2014-05-05 18:58:49.654207305 +0200 +++ drivers/staging/silicom/bpctl_mod.c 2014-05-05 18:59:10.394206591 +0200 @@ -7448,8 +7448,8 @@ static int bypass_proc_create_dev_sd(str static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { - struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; + remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir); current_pfs->bypass_entry = NULL; return 0; ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] [staging/silicom] Fixing missing blank line after declarations
On Mon, May 05, 2014 at 10:38:37AM -0700, Greg KH wrote: > On Mon, May 05, 2014 at 07:10:37PM +0200, Fernando Apesteguia wrote: > > On Mon, May 05, 2014 at 09:57:48AM -0700, Greg KH wrote: > > > On Mon, May 05, 2014 at 06:40:13PM +0200, Fernando Apesteguia wrote: > > > > Small fix to driver. If these patches are welcomed, more could come in > > > > the > > > > future. > > > > > > > > Regards > > > > > > > >From d8369cba0552c5ea5f4eadc750434e39785e042a Mon Sep 17 00:00:00 2001 > > > > From: Fernando Apesteguia > > > > Date: Mon, 5 May 2014 18:16:53 +0200 > > > > Subject: [PATCH] [staging/silicom] Fixing missing blank line after > > > > declarations > > > > > > > > --- > > > > drivers/staging/silicom/bpctl_mod.c |1 + > > > > 1 file changed, 1 insertion(+) > > > > > > They would be welcome if they were in a format I could apply them in :) > > > > > > See Documentation/SubmittingPatches for the details on how to do this > > > properly. > > > > I think this one is good. > > What one? This email, no, I can't take it. > > The patch needs to be in a format that I do not need to edit by hand, > and you forgot the signed-off-by: line, which is described in the kernel > file I pointed you at. Please read that file for what it means, and how > to properly format a patch for inclusion. From: Fernando Apesteguia Fix style bug by removing blank line at the beginning of the function and adding an empty line after variable declarations Signed-off-by: Fernando Apesteguia --- --- drivers/staging/silicom/bpctl_mod.c.orig2014-05-05 18:58:49.654207305 +0200 +++ drivers/staging/silicom/bpctl_mod.c 2014-05-05 18:59:10.394206591 +0200 @@ -7448,8 +7448,8 @@ static int bypass_proc_create_dev_sd(str static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { - struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; + remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir); current_pfs->bypass_entry = NULL; return 0; > > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Add blank line after declarations
From: Fernando Apesteguia Add blank line after declarations and delete extra blank line at the beginning of the function Signed-off-by: Fernando Apesteguia --- drivers/staging/silicom/bpctl_mod.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 7f3d884..266becf 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -7448,8 +7448,8 @@ static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block) static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { - struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; + remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir); current_pfs->bypass_entry = NULL; return 0; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: silicom: add blank line after declarations
From: Fernando Apesteguia Add blank line after declarations and delete extra blank line at the beginning of the function Signed-off-by: Fernando Apesteguia --- drivers/staging/silicom/bpctl_mod.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/silicom/bpctl_mod.c b/drivers/staging/silicom/bpctl_mod.c index 7f3d884..266becf 100644 --- a/drivers/staging/silicom/bpctl_mod.c +++ b/drivers/staging/silicom/bpctl_mod.c @@ -7448,8 +7448,8 @@ static int bypass_proc_create_dev_sd(struct bpctl_dev *pbp_device_block) static int bypass_proc_remove_dev_sd(struct bpctl_dev *pbp_device_block) { - struct bypass_pfs_sd *current_pfs = &pbp_device_block->bypass_pfs_set; + remove_proc_subtree(current_pfs->dir_name, bp_procfs_dir); current_pfs->bypass_entry = NULL; return 0; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vt6655: Fix device table definition.
From: Fernando Apesteguia Add static to the definition of the pci device table. Signed-off-by: Fernando Apesteguia --- drivers/staging/vt6655/device_main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 1d3908d..99a1f97 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -260,7 +260,7 @@ static CHIP_INFO chip_info_table[] = { {0, NULL} }; -const struct pci_device_id vt6655_pci_id_table[] = { +static const struct pci_device_id vt6655_pci_id_table[] = { { PCI_VDEVICE(VIA, 0x3253), (kernel_ulong_t)chip_info_table}, { 0, } }; -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: vt6655: staticfy variable
From: Fernando Apesteguia Add static to variable. Signed-off-by: Fernando Apesteguia --- drivers/staging/vt6655/ioctl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 65e5933..cc6e47b 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -41,7 +41,7 @@ static int msglevel = MSG_LEVEL_INFO; #ifdef WPA_SM_Transtatus -SWPAResult wpa_Result; +static SWPAResult wpa_Result; #endif int private_ioctl(PSDevice pDevice, struct ifreq *rq) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8192u: Staticfy debug method.
From: Fernando Apesteguia Add static to debug method. Signed-off-by: Fernando Apesteguia --- drivers/staging/rtl8192u/r8192U_core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..c732a67 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ -void dump_eprom(struct net_device *dev) +static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rtl8192u: remove unused function.
From: Fernando Apesteguia Remove ComputeTxTime since it is not used. Signed-off-by: Fernando Apesteguia --- drivers/staging/rtl8192u/r8192U_core.c | 22 -- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..1a9f526 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1486,28 +1486,6 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate) u16 N_DBPSOfRate(u16 DataRate); -u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame, - u8 bShortPreamble) -{ - u16 FrameTime; - u16 N_DBPS; - u16 Ceiling; - - if (rtl8192_IsWirelessBMode(DataRate)) { - if (bManagementFrame || !bShortPreamble || DataRate == 10) /* long preamble */ - FrameTime = (u16)(144+48+(FrameLength*8/(DataRate/10))); - else // Short preamble - FrameTime = (u16)(72+24+(FrameLength*8/(DataRate/10))); - if ((FrameLength*8 % (DataRate/10)) != 0) /* Get the Ceilling */ - FrameTime++; - } else {//802.11g DSSS-OFDM PLCP length field calculation. - N_DBPS = N_DBPSOfRate(DataRate); - Ceiling = (16 + 8*FrameLength + 6) / N_DBPS - + (((16 + 8*FrameLength + 6) % N_DBPS) ? 1 : 0); - FrameTime = (u16)(16 + 4 + 4*Ceiling + 6); - } - return FrameTime; -} u16 N_DBPSOfRate(u16 DataRate) { -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel