All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Deepak R Varma <mh12gx2825@gmail.com>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
	daniel.baluta@gmail.com, kieran.bingham@ideasonboard.com,
	abbotti@mev.co.uk, hsweeten@visionengravers.com
Subject: Re: [Outreachy kernel] [PATCH] staging: comedi: ni_tio: Reformat function call arguments
Date: Tue, 17 Mar 2020 13:19:52 +0100	[thread overview]
Message-ID: <20200317131952.7e19a55f@elisabeth> (raw)
In-Reply-To: <20200314214254.GA3941@deeUbuntu>

On Sun, 15 Mar 2020 03:12:57 +0530
Deepak R Varma <mh12gx2825@gmail.com> wrote:

> Reformat function call arguments so that the function call is clearly
> visible. Issue detected by checkpatch.
> 
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> ---
>  drivers/staging/comedi/drivers/ni_tio.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
> index b264db32a411..f6154addaa95 100644
> --- a/drivers/staging/comedi/drivers/ni_tio.c
> +++ b/drivers/staging/comedi/drivers/ni_tio.c
> @@ -1342,8 +1342,8 @@ static int ni_m_gate2_to_generic_gate(unsigned int gate, unsigned int *src)
>  
>  static inline unsigned int ni_tio_get_gate_mode(struct ni_gpct *counter)
>  {
> -	unsigned int mode = ni_tio_get_soft_copy(
> -		counter, NITIO_MODE_REG(counter->counter_index));
> +	unsigned int mode = ni_tio_get_soft_copy(counter,
> +				NITIO_MODE_REG(counter->counter_index));
>  	unsigned int ret = 0;
>  
>  	if ((mode & GI_GATING_MODE_MASK) == GI_GATING_DISABLED)
> @@ -1358,8 +1358,8 @@ static inline unsigned int ni_tio_get_gate_mode(struct ni_gpct *counter)
>  
>  static inline unsigned int ni_tio_get_gate2_mode(struct ni_gpct *counter)
>  {
> -	unsigned int mode = ni_tio_get_soft_copy(
> -		counter, NITIO_GATE2_REG(counter->counter_index));
> +	unsigned int mode = ni_tio_get_soft_copy(counter,
> +				NITIO_GATE2_REG(counter->counter_index));
>  	unsigned int ret = 0;
>  
>  	if (!(mode & GI_GATE2_MODE))

I think both the original version and the "fixed" one are quite hard to
read, the proper way to fix this is to initialise 'mode' after the
declaration.

-- 
Stefano



      reply	other threads:[~2020-03-17 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14 21:42 [PATCH] staging: comedi: ni_tio: Reformat function call arguments Deepak R Varma
2020-03-17 12:19 ` Stefano Brivio [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=20200317131952.7e19a55f@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=abbotti@mev.co.uk \
    --cc=daniel.baluta@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=mh12gx2825@gmail.com \
    --cc=outreachy-kernel@googlegroups.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 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.