From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753407AbbGQLle (ORCPT ); Fri, 17 Jul 2015 07:41:34 -0400 Received: from 202-89-161-53.static.dsl.amnet.net.au ([202.89.161.53]:16525 "EHLO GateKeeper.xayto.local" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752312AbbGQLld (ORCPT ); Fri, 17 Jul 2015 07:41:33 -0400 Date: Fri, 17 Jul 2015 18:59:53 +0000 From: Craig Inches To: Dan Carpenter Cc: Craig Inches , 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 Message-ID: <20150717185953.GA17821@Morat.xayto.local> References: <1437102204-32016-1-git-send-email-craig.inches@xayto.net> <20150716201343.GB1148@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150716201343.GB1148@mwanda> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2015 at 11:13:43PM +0300, Dan Carpenter wrote: > 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. Sorry.. I dont know why I didnt do that. > > @@ -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); Thanks I saw a combination of either, I will take another look. > > 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. OK, Ill another look at this aswell. Thank you for the feedback Dan. > regards, > dan carpenter >