Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751328AbcLDTGc (ORCPT ); Sun, 4 Dec 2016 14:06:32 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:36700 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbcLDTGb (ORCPT ); Sun, 4 Dec 2016 14:06:31 -0500 Date: Sun, 4 Dec 2016 20:06:26 +0100 From: Fernando Apesteguia To: Greg KH Cc: lidza.louina@gmail.com, devel@driverdev.osuosl.org, driverdev-devel@linuxdriverproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: dgnc: Fix lines longer than 80 characters Message-ID: <20161204190626.GA2531@erazer> References: <1480706029-28267-1-git-send-email-fernando.apesteguia@gmail.com> <20161203085113.GA1664@kroah.com> <20161203095654.GA2558@erazer> <20161203101123.GB13906@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161203101123.GB13906@kroah.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2478 Lines: 57 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