mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ray Clinton <mr.ray.clinton@gmail.com>
Cc: abbotti@mev.co.uk, hsweeten@visionengravers.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] staging: comedi: Correct multiline dereference as per TODO
Date: Mon, 10 Sep 2018 10:35:02 +0200	[thread overview]
Message-ID: <20180910083502.GB29149@kroah.com> (raw)
In-Reply-To: <CAPMnawsnkBnRM--55G7tgJtZFKyn7VsCbWQ3jxssehznhA=_Kw@mail.gmail.com>

On Thu, Aug 30, 2018 at 01:32:17PM -0400, Ray Clinton wrote:
> Using checkpatch.pl I was able to find a multiline dereference which goes
> again the coding style for the kernel. I'm still working on my email client so
> the indentation looks bad here (in gmail) but the arguments for
> comedi_check_trigger_arg_min should go just under the opening (
> 
> Signed-off-by: Ray Clinton <mr.ray.clinton@gmail.com>
> ---
>  drivers/staging/comedi/drivers/ni_labpc_common.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/ni_labpc_common.c
> b/drivers/staging/comedi/drivers/ni_labpc_common.c
> index 7fa2d39..0fad809 100644
> --- a/drivers/staging/comedi/drivers/ni_labpc_common.c
> +++ b/drivers/staging/comedi/drivers/ni_labpc_common.c
> @@ -560,10 +560,10 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,
>         /* make sure scan timing is not too fast */
>         if (cmd->scan_begin_src == TRIG_TIMER) {
>                 if (cmd->convert_src == TRIG_TIMER) {
> -                       err |= comedi_check_trigger_arg_min(&cmd->
> -                                                           scan_begin_arg,
> -                                                           cmd->convert_arg *
> -                                                           cmd->chanlist_len);
> +                       err |= comedi_check_trigger_arg_min(
> +                                                          &cmd->scan_begin_arg,
> +                                                          cmd->convert_arg *
> +                                                          cmd->chanlist_len);

Ick, this is still messy, just try making this:

			err |= comedi_check_trigger_arg_min(&cmd->scan_begin_arg,
							    cmd->convert_arg * cmd->chanlist_len);

Yeah, it's over 80 columns, but it looks better and is easier to read,
right?

Also, all your patches have the whitespace turned from tabs into spaces,
making them impossible to be applied even if I wanted to :)

thanks,

greg k-h

      reply	other threads:[~2018-09-10  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 17:32 Ray Clinton
2018-09-10  8:35 ` Greg KH [this message]

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=20180910083502.GB29149@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=abbotti@mev.co.uk \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mr.ray.clinton@gmail.com \
    /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

Powered by JetHome