Skip to contentSkip to conversation

staging: vt6655: Fix checkpatch issues

PATCH Superseded Namrata A Shettar 2 participants 7 messages Sep 17, 2016 – Sep 18, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: vt6655: Fix checkpatch issues

Fix multiple checkpatch issues.

Namrata A Shettar (4):
staging: vt6655: Replace explicit NULL comparison
staging: vt6655: Replace explicit NULL comparison
staging: vt6655: Break multiple assignments
staging: vt6655: Break multiple assignments

 drivers/staging/vt6655/card.c        | 6 ++++--
 drivers/staging/vt6655/device_main.c | 7 ++++---
 2 files changed, 8 insertions(+), 5 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/4 staging: vt6655: Replace explicit NULL comparison

Replace explicit NULL comparison to resolve checkpatch issue. Comparing variable x with NULL same as !x in this case.

---
 drivers/staging/vt6655/device_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +1 -1
index ed12b5c..62418c2 100644
@@ -477,7 +477,7 @@ static bool device_init_rings(struct vnt_private *priv)
 					     CB_MAX_BUF_SIZE,
 					     &priv->tx_bufs_dma0,
 					     GFP_ATOMIC);
-	if (priv->tx0_bufs == NULL) {
+	if (!priv->tx0_bufs) {
 		dev_err(&priv->pcid->dev, "allocate buf dma memory failed\n");
 
 		dma_free_coherent(&priv->pcid->dev,
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/4] staging: vt6655: Replace explicit NULL comparison

Quoted 7 lines · Namrata A Shettar

Replace explicit NULL comparison to resolve checkpatch issue. Comparing variable x with NULL same as !x in this case.

---
 drivers/staging/vt6655/device_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

You have 4 patches here, yet you only have 2 unique subjects. Don't have 2 different patches with the same subject line, that implies that they are identical, right?

Please fix that up and resend this series.

thanks,

greg k-h

#3 lore raw

Re: [PATCH 1/4] staging: vt6655: Replace explicit NULL comparison

Quoted 13 lines · Greg Kroah-Hartman
Quoted 7 lines · Namrata A Shettar

Replace explicit NULL comparison to resolve checkpatch issue. Comparing variable x with NULL same as !x in this case.

---
 drivers/staging/vt6655/device_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

You have 4 patches here, yet you only have 2 unique subjects. Don't have 2 different patches with the same subject line, that implies that they are identical, right?

Quoted 5 lines

Please fix that up and resend this series.

thanks,

greg k-h

Thanks for pointing that out. Will correct that and resend the series.

namrata

#4 lore raw

PATCH 2/4 staging: vt6655: Replace explicit NULL comparison

In reply to Namrata A Shettar

Replace explicit NUll comparison to resolve checkpatch issue. Comparing variable x with NULL same as !x in this case.

---
 drivers/staging/vt6655/device_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +1 -1
index 62418c2..f109eea 100644
@@ -735,7 +735,7 @@ static bool device_alloc_rx_buf(struct vnt_private *priv,
 	struct vnt_rd_info *rd_info = rd->rd_info;
 
 	rd_info->skb = dev_alloc_skb((int)priv->rx_buf_sz);
-	if (rd_info->skb == NULL)
+	if (!rd_info->skb)
 		return false;
 
 	rd_info->skb_dma =
Signature · 1 line
2.7.4
#5 lore raw

PATCH 3/4 staging: vt6655: Break multiple assignments

In reply to Namrata A Shettar

Break up multiple assignments on same line to resolve checkpatch issue.

---
 drivers/staging/vt6655/card.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/vt6655/card.c +4 -2
index afb1e8b..00e7858 100644
@@ -528,8 +528,10 @@ CARDvSafeResetTx(
 	struct vnt_tx_desc *pCurrTD;
 
 	/* initialize TD index */
-	priv->apTailTD[0] = priv->apCurrTD[0] = &(priv->apTD0Rings[0]);
-	priv->apTailTD[1] = priv->apCurrTD[1] = &(priv->apTD1Rings[0]);
+        priv->apCurrTD[0] = &(priv->apTD0Rings[0]);
+	priv->apTailTD[0] = priv->apCurrTD[0];
+        priv->apCurrTD[1] = &(priv->apTD1Rings[0]);
+	priv->apTailTD[1] = priv->apCurrTD[1];
 
 	for (uu = 0; uu < TYPE_MAXTD; uu++)
 		priv->iTDUsed[uu] = 0;
Signature · 1 line
2.7.4
#6 lore raw

PATCH 4/4 staging: vt6655: Break multiple assignments

In reply to Namrata A Shettar

Break up multiple assignments on same line to resolve checkpatch issue.

---
 drivers/staging/vt6655/device_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +2 -1
index f109eea..86532ca 100644
@@ -669,7 +669,8 @@ static void device_init_td1_ring(struct vnt_private *priv)
 
 	if (i > 0)
 		priv->apTD1Rings[i-1].next_desc = cpu_to_le32(priv->td1_pool_dma);
-	priv->apTailTD[1] = priv->apCurrTD[1] = &priv->apTD1Rings[0];
+	 priv->apCurrTD[1] = &priv->apTD1Rings[0];
+	 priv->apTailTD[1] = priv->apCurrTD[1];
 }
 
 static void device_free_td0_ring(struct vnt_private *priv)
Signature · 1 line
2.7.4