Skip to contentSkip to conversation

staging: vt6655: Break up function call with long line.

PATCH Superseded Briana Oursler 3 participants 6 messages Mar 24, 2020 – Mar 30, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6655: Break up function call with long line.

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +4 -1
index 0442f71494b2..b28f3b28849b 100644
@@ -443,7 +443,10 @@ static bool device_init_rings(struct vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
+				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc)
+				      + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc)
+				      + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc)
+				      + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
 				      &priv->pool_dma, GFP_ATOMIC);
 	if (!vir_pool) {
 		dev_err(&priv->pcid->dev, "allocate desc dma memory failed\n");
Signature · 1 line
2.24.1
maintainer
#1 lore raw
Quoted 13 lines · Briana Oursler

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +0 -0
index 0442f71494b2..b28f3b28849b 100644

drivers/staging/vt6655/device_main.c static bool device_init_rings(struct vnt_private *priv) · line 449

Quoted 8 lines
drivers/staging/vt6655/device_main.c +4 -1
@@ -443,7 +443,10 @@ static bool device_init_rings(struct vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
+				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc)
+				      + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc)
+				      + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc)
+				      + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),

The "+" should go on the end of the line, not the front of the line.

thanks,

greg k-h

#2 lore raw

PATCH v2 1/1 staging: vt6655: Break up function call with long line.

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
Changes in v2:
- Move '+' operator to end of line.

 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +4 -1
index 0442f71494b2..5c86cc60eb5c 100644
@@ -443,7 +443,10 @@ static bool device_init_rings(struct vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
+				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) +
+				      priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) +
+				      priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) +
+				      priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
 				      &priv->pool_dma, GFP_ATOMIC);
 	if (!vir_pool) {
 		dev_err(&priv->pcid->dev, "allocate desc dma memory failed\n");
Signature · 1 line
2.24.1
Reviewed-by on v2 1/1
#3 lore raw
Quoted 16 lines · On Tue, 24 Mar 2020 11:38:12 -0700 Briana Oursler <[email protected]>…

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
Changes in v2:
- Move '+' operator to end of line.

 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +0 -0
index 0442f71494b2..5c86cc60eb5c 100644

drivers/staging/vt6655/device_main.c static bool device_init_rings(struct vnt_private *priv) · line 449

Quoted 8 lines
drivers/staging/vt6655/device_main.c +4 -1
@@ -443,7 +443,10 @@ static bool device_init_rings(struct vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) + priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),
+				      priv->opts.rx_descs0 * sizeof(struct vnt_rx_desc) +
+				      priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) +
+				      priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc) +
+				      priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),

Two notes:

- it's a bit unusual to post a new patch version as a reply of a comment to a previous version -- did you read about this somewhere?

- a * x + b * x = (a + b) * x

Signature · 1 line
Stefano
#4 lore raw
Quoted 39 lines · Stefano Brivio
Quoted 32 lines · On Tue, 24 Mar 2020 11:38:12 -0700 Briana Oursler <[email protected]>…

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
Changes in v2:
- Move '+' operator to end of line.

 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +0 -1
index 0442f71494b2..5c86cc60eb5c 100644
@@ -443,7 +443,10 @@ static bool device_init_rings(struct
 vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 *

sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc)
+ priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.rx_descs0 *

sizeof(struct vnt_rx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.rx_descs1 *

sizeof(struct vnt_rx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.tx_descs[0] *

sizeof(struct vnt_tx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.tx_descs[1] *
Quoted 1 line

sizeof(struct vnt_tx_desc),

Quoted 4 lines

Two notes:

- it's a bit unusual to post a new patch version as a reply of a comment to a previous version -- did you read about this somewhere?

I think I basically misunderstood the normal use case of 'in-reply-to'. Rereading that section of the first patch tutorial, I definitely misread it. I've been resending all my patches as replies. I'll change that up.

Quoted 2 lines

- a * x + b * x = (a + b) * x

Wow, yes. I will try to think more critically about context, it seems so obvious now. Should I update it, or is it too late in the process? Is there a 'too late'? Thank you,

-- Briana

Quoted 1 line
#5 lore raw
Quoted 42 lines · On Sun, 29 Mar 2020 20:21:24 -0700 Briana Oursler <[email protected]>…
Quoted 41 lines · Stefano Brivio
Quoted 32 lines · On Tue, 24 Mar 2020 11:38:12 -0700 Briana Oursler <[email protected]>…

Update matches style found elsewhere in file. Issue found by checkpatch: line over 80 characters.

---
Changes in v2:
- Move '+' operator to end of line.

 drivers/staging/vt6655/device_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +0 -1
index 0442f71494b2..5c86cc60eb5c 100644
@@ -443,7 +443,10 @@ static bool device_init_rings(struct
 vnt_private *priv)
 
 	/*allocate all RD/TD rings a single pool*/
 	vir_pool = dma_alloc_coherent(&priv->pcid->dev,
-				      priv->opts.rx_descs0 *

sizeof(struct vnt_rx_desc) + priv->opts.rx_descs1 * sizeof(struct vnt_rx_desc) + priv->opts.tx_descs[0] * sizeof(struct vnt_tx_desc)
+ priv->opts.tx_descs[1] * sizeof(struct vnt_tx_desc),

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.rx_descs0 *

sizeof(struct vnt_rx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.rx_descs1 *

sizeof(struct vnt_rx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.tx_descs[0] *

sizeof(struct vnt_tx_desc) +

drivers/staging/vt6655/device_main.c +1 -0
+				      priv->opts.tx_descs[1] *
Quoted 1 line

sizeof(struct vnt_tx_desc),

Two notes:

Quoted 7 lines
Quoted 2 lines

- it's a bit unusual to post a new patch version as a reply of a comment to a previous version -- did you read about this somewhere?

I think I basically misunderstood the normal use case of 'in-reply-to'. Rereading that section of the first patch tutorial, I definitely misread it. I've been resending all my patches as replies. I'll change that up.

Ah, I see now. By the way, you can also refer to Documentation/process/submitting-patches.rst -- it might be more explanatory than the first patch tutorial. This, in particular, is covered by section:

15) Explicit In-Reply-To headers

Quoted 4 lines
Quoted 1 line

- a * x + b * x = (a + b) * x

Wow, yes. I will try to think more critically about context, it seems so obvious now. Should I update it, or is it too late in the process?

No, I don't think you should update it, your patch is fine, that might be perceived as an unrelated change, and that's also why I gave my Reviewed-by. I was just suggesting a further clean-up.

Quoted 1 line

Is there a 'too late'? Thank you,

If the maintainer has already merged your patch, well, it's "too late" in the sense that you simply need to post another patch.

Ideally, you would update your copy of the git tree just before you restart working on it. If it's not there, reply to your patch asking for it to be discarded, proceed updating it and re-post. It might also be that the maintainer has merged it in the meantime, in which case they will tell you and you'll need to rebase.

If the patch is already there and you find a mistake, post a follow-up with a Fixes: tag (see submitting-patches.rst for that).

Signature · 1 line
Stefano