lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161203095654.GA2558@erazer>
Date:   Sat, 3 Dec 2016 10:56:54 +0100
From:   Fernando Apesteguia <fernando.apesteguia@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     lidza.louina@...il.com, devel@...verdev.osuosl.org,
        driverdev-devel@...uxdriverproject.org,
        linux-kernel@...r.kernel.org
Subject: 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 <fernando.apesteguia@...il.com>
> > ---
> >  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ