[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150716201343.GB1148@mwanda>
Date: Thu, 16 Jul 2015 23:13:43 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Craig Inches <craig.inches@...to.net>
Cc: lidza.louina@...il.com, devel@...verdev.osuosl.org,
gregkh@...uxfoundation.org, driverdev-devel@...uxdriverproject.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] Drivers: Staging: dgnc: Fix Style Issues
On Fri, Jul 17, 2015 at 03:03:24AM +0000, Craig Inches wrote:
> Fixed multiple instances of:
>
> CHECK: Alignment should match open parenthesis
> CHECK: Blank lines aren't necessary before a close brace '}'
> CHECK: Please don't use multiple blank lines
> CHECK: Blank lines aren't necessary after an open brace '{'
> WARNING: line over 80 characters
>
Split the patch into 5 patches.
> @@ -186,18 +191,23 @@ int dgnc_tty_register(struct dgnc_board *brd)
> brd->SerialDriver.subtype = SERIAL_TYPE_NORMAL;
> brd->SerialDriver.init_termios = DgncDefaultTermios;
> brd->SerialDriver.driver_name = DRVSTR;
> - brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK);
> + brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV
> + | TTY_DRIVER_HARDWARE_BREAK);
The operator goes on the end.
brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV |
TTY_DRIVER_HARDWARE_BREAK);
> kref_init(&brd->PrintDriver.kref);
> - brd->PrintDriver.termios = kcalloc(brd->maxports, sizeof(*brd->PrintDriver.termios), GFP_KERNEL);
> + brd->PrintDriver.termios = kcalloc(brd->maxports,
> + sizeof(*brd->PrintDriver.termios),
> + GFP_KERNEL);
Not aligned correctly.
> if (ch->ch_tun.un_flags & UN_ISOPEN) {
> if ((ch->ch_tun.un_tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
> - ch->ch_tun.un_tty->ldisc->ops->write_wakeup) {
> - spin_unlock_irqrestore(&ch->ch_lock, flags);
> - (ch->ch_tun.un_tty->ldisc->ops->write_wakeup)(ch->ch_tun.un_tty);
> - spin_lock_irqsave(&ch->ch_lock, flags);
> + ch->ch_tun.un_tty->ldisc->ops->write_wakeup) {
> + spin_unlock_irqrestore(&ch->ch_lock, flags);
> + (ch->ch_tun.un_tty->ldisc->ops->write_wakeup)
> + (ch->ch_tun.un_tty);
> + spin_lock_irqsave(&ch->ch_lock, flags);
> }
This isn't correct at all.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists