All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: vt6655: Break multiple assignments in one line
Date: Tue, 27 Oct 2020 10:59:05 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2010271057530.2847@hadrien> (raw)
In-Reply-To: <20201025032331.GA9095@Zangetsu>



On Sat, 24 Oct 2020, Marcos Antonio de Jesus Filho wrote:

> The kernel coding style disencourage multiple assignments in one
> line. Split this multiple assignments in one line into single assignments
> in multiple lines following this recommendation. Issue found by
> checkpatch.
>
> Signed-off-by: Marcos Antonio de Jesus Filho <mdejesusfilho@gmail.com>
> ---
>  drivers/staging/vt6655/device_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
> index 09ab6d6f2429..ec73b4ac82e6 100644
> --- a/drivers/staging/vt6655/device_main.c
> +++ b/drivers/staging/vt6655/device_main.c
> @@ -670,7 +670,8 @@ static int device_init_td0_ring(struct vnt_private *priv)
>
>  	if (i > 0)
>  		priv->apTD0Rings[i - 1].next_desc = cpu_to_le32(priv->td0_pool_dma);
> -	priv->apTailTD[0] = priv->apCurrTD[0] = &priv->apTD0Rings[0];
> +	priv->apCurrTD[0] = &priv->apTD0Rings[0];
> +	priv->apTailTD[0] = priv->apCurrTD[0];

I think this was already tried and Greg already expressed the opinion that
in this case the code is ok as it.

It might have something to do with the fact that all of the elements have
about the same size, which makes it a bit easier to see what is going on.

julia

>
>  	return 0;
>
> --
> 2.28.0
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20201025032331.GA9095%40Zangetsu.
>


      parent reply	other threads:[~2020-10-27  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-25  3:23 [PATCH] staging: vt6655: Break multiple assignments in one line Marcos Antonio de Jesus Filho
2020-10-25  9:20 ` Greg Kroah-Hartman
2020-10-27  9:59 ` Julia Lawall [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=alpine.DEB.2.22.394.2010271057530.2847@hadrien \
    --to=julia.lawall@inria.fr \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=mdejesusfilho@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.