All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Fernando Apesteguia <fernando.apesteguia@gmail.com>
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
Date: Sat, 3 Dec 2016 09:51:13 +0100	[thread overview]
Message-ID: <20161203085113.GA1664@kroah.com> (raw)
In-Reply-To: <1480706029-28267-1-git-send-email-fernando.apesteguia@gmail.com>

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@gmail.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.

Yes, naming is hard, one of the hardest things in programming.

thanks,

greg k-h

  reply	other threads:[~2016-12-03  9:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 19:13 [PATCH] staging: dgnc: Fix lines longer than 80 characters Fernando Apesteguia
2016-12-03  8:51 ` Greg KH [this message]
2016-12-03  9:56   ` Fernando Apesteguia
2016-12-03 10:11     ` Greg KH
2016-12-04 19:06       ` Fernando Apesteguia
2016-12-05 20:51 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2016-09-28 17:20 Fernando Apesteguia

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=20161203085113.GA1664@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=fernando.apesteguia@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.