All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vt6655: Break multiple assignments in one line
@ 2020-10-25  3:23 Marcos Antonio de Jesus Filho
  2020-10-25  9:20 ` Greg Kroah-Hartman
  2020-10-27  9:59 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Antonio de Jesus Filho @ 2020-10-25  3:23 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman, outreachy-kernel

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];
 
 	return 0;
 
-- 
2.28.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: vt6655: Break multiple assignments in one line
  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 ` [Outreachy kernel] " Julia Lawall
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-10-25  9:20 UTC (permalink / raw)
  To: Marcos Antonio de Jesus Filho; +Cc: Forest Bond, outreachy-kernel

On Sat, Oct 24, 2020 at 08:23:31PM -0700, 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];

The original here is fine, you can ignore this checkpatch warning here.

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: vt6655: Break multiple assignments in one line
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2020-10-27  9:59 UTC (permalink / raw)
  To: Marcos Antonio de Jesus Filho
  Cc: Forest Bond, Greg Kroah-Hartman, outreachy-kernel



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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-27  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Outreachy kernel] " Julia Lawall

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.