public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Craig Inches <craig.inches@xayto.net>
Cc: lidza.louina@gmail.com, devel@driverdev.osuosl.org,
	gregkh@linuxfoundation.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Drivers: Staging: dgnc: Fix Style Issues
Date: Thu, 16 Jul 2015 23:13:43 +0300	[thread overview]
Message-ID: <20150716201343.GB1148@mwanda> (raw)
In-Reply-To: <1437102204-32016-1-git-send-email-craig.inches@xayto.net>

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


  reply	other threads:[~2015-07-16 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17  3:03 [PATCH v2] Drivers: Staging: dgnc: Fix Style Issues Craig Inches
2015-07-16 20:13 ` Dan Carpenter [this message]
2015-07-17 18:59   ` Craig Inches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150716201343.GB1148@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=craig.inches@xayto.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lidza.louina@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox