Skip to contentSkip to conversation

staging: qlge: Resolve various warnings issued by checkpatch.pl

PATCH In review Soumyajit Deb 3 participants 11 messages Mar 28, 2020 – Apr 6, 2020 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: qlge: Resolve various warnings issued by checkpatch.pl

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 staging: qlge: Add space around operators

Add space around various binary operators to improve code readability and to adhere to the Linux Kernel coding style.
Reported by checkpatch.pl

---
 drivers/staging/qlge/qlge_main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/qlge/qlge_main.c +9 -9
index c92820f07968..36f8d2890f9a 100644
@@ -702,7 +702,7 @@ static int ql_get_8000_flash_params(struct ql_adapter *qdev)
 
 	size = sizeof(struct flash_params_8000) / sizeof(u32);
 	for (i = 0; i < size; i++, p++) {
-		status = ql_read_flash_word(qdev, i+offset, p);
+		status = ql_read_flash_word(qdev, i + offset, p);
 		if (status) {
 			netif_err(qdev, ifup, qdev->ndev,
 				  "Error reading flash.\n");
@@ -765,7 +765,7 @@ static int ql_get_8012_flash_params(struct ql_adapter *qdev)
 		return -ETIMEDOUT;
 
 	for (i = 0; i < size; i++, p++) {
-		status = ql_read_flash_word(qdev, i+offset, p);
+		status = ql_read_flash_word(qdev, i + offset, p);
 		if (status) {
 			netif_err(qdev, ifup, qdev->ndev,
 				  "Error reading flash.\n");
@@ -1543,7 +1543,7 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
 			struct iphdr *iph =
 				(struct iphdr *)((u8 *)addr + hlen);
 			if (!(iph->frag_off &
-				htons(IP_MF|IP_OFFSET))) {
+				htons(IP_MF | IP_OFFSET))) {
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 				netif_printk(qdev, rx_status, KERN_DEBUG,
 					     qdev->ndev,
@@ -1650,7 +1650,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
 			struct iphdr *iph = (struct iphdr *) skb->data;
 
 			if (!(iph->frag_off &
-				htons(IP_MF|IP_OFFSET))) {
+				htons(IP_MF | IP_OFFSET))) {
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 				netif_printk(qdev, rx_status, KERN_DEBUG,
 					     qdev->ndev,
@@ -1939,7 +1939,7 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev,
 			struct iphdr *iph = (struct iphdr *) skb->data;
 
 			if (!(iph->frag_off &
-				htons(IP_MF|IP_OFFSET))) {
+				htons(IP_MF | IP_OFFSET))) {
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 				netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
 					     "TCP checksum done!\n");
@@ -4563,7 +4563,7 @@ static void ql_timer(struct timer_list *t)
 		return;
 	}
 
-	mod_timer(&qdev->timer, jiffies + (5*HZ));
+	mod_timer(&qdev->timer, jiffies + (5 * HZ));
 }
 
 static int qlge_probe(struct pci_dev *pdev,
@@ -4635,7 +4635,7 @@ static int qlge_probe(struct pci_dev *pdev,
 	 * the bus goes dead
 	 */
 	timer_setup(&qdev->timer, ql_timer, TIMER_DEFERRABLE);
-	mod_timer(&qdev->timer, jiffies + (5*HZ));
+	mod_timer(&qdev->timer, jiffies + (5 * HZ));
 	ql_link_off(qdev);
 	ql_display_dev_info(ndev);
 	atomic_set(&qdev->lb_count, 0);
@@ -4769,7 +4769,7 @@ static void qlge_io_resume(struct pci_dev *pdev)
 		netif_err(qdev, ifup, qdev->ndev,
 			  "Device was not running prior to EEH.\n");
 	}
-	mod_timer(&qdev->timer, jiffies + (5*HZ));
+	mod_timer(&qdev->timer, jiffies + (5 * HZ));
 	netif_device_attach(ndev);
 }
 
@@ -4831,7 +4831,7 @@ static int qlge_resume(struct pci_dev *pdev)
 			return err;
 	}
 
-	mod_timer(&qdev->timer, jiffies + (5*HZ));
+	mod_timer(&qdev->timer, jiffies + (5 * HZ));
 	netif_device_attach(ndev);
 
 	return 0;
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/3 staging: qlge: Remove extra blank lines

In reply to Soumyajit Deb

Remove unnecessary extra blank lines to impose Linux Kernel coding style and adhere to it.
Reported by checkpatch.pl

---
 drivers/staging/qlge/qlge_main.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/staging/qlge/qlge_main.c +0 -9
index 36f8d2890f9a..fa697fe4fb77 100644
@@ -771,7 +771,6 @@ static int ql_get_8012_flash_params(struct ql_adapter *qdev)
 				  "Error reading flash.\n");
 			goto exit;
 		}
-
 	}
 
 	status = ql_validate_flash(qdev,
@@ -1240,7 +1239,6 @@ static void ql_unmap_send(struct ql_adapter *qdev,
 						     maplen), PCI_DMA_TODEVICE);
 		}
 	}
-
 }
 
 /* Map the buffers for this transmit.  This will return
@@ -1354,7 +1352,6 @@ static int ql_map_send(struct ql_adapter *qdev,
 		dma_unmap_addr_set(&tx_ring_desc->map[map_idx], mapaddr, map);
 		dma_unmap_len_set(&tx_ring_desc->map[map_idx], maplen,
 				  skb_frag_size(frag));
-
 	}
 	/* Save the number of segments we've mapped. */
 	tx_ring_desc->map_cnt = map_idx;
@@ -2118,7 +2115,6 @@ static int ql_clean_outbound_rx_ring(struct rx_ring *rx_ring)
 	struct tx_ring *tx_ring;
 	/* While there are entries in the completion queue. */
 	while (prod != rx_ring->cnsmr_idx) {
-
 		netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
 			     "cq_id = %d, prod = %d, cnsmr = %d\n",
 			     rx_ring->cq_id, prod, rx_ring->cnsmr_idx);
@@ -2126,7 +2122,6 @@ static int ql_clean_outbound_rx_ring(struct rx_ring *rx_ring)
 		net_rsp = (struct ob_mac_iocb_rsp *)rx_ring->curr_entry;
 		rmb();
 		switch (net_rsp->opcode) {
-
 		case OPCODE_OB_MAC_TSO_IOCB:
 		case OPCODE_OB_MAC_IOCB:
 			ql_process_mac_tx_intr(qdev, net_rsp);
@@ -2165,7 +2160,6 @@ static int ql_clean_inbound_rx_ring(struct rx_ring *rx_ring, int budget)
 
 	/* While there are entries in the completion queue. */
 	while (prod != rx_ring->cnsmr_idx) {
-
 		netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
 			     "cq_id = %d, prod = %d, cnsmr = %d\n",
 			     rx_ring->cq_id, prod, rx_ring->cnsmr_idx);
@@ -2478,7 +2472,6 @@ static irqreturn_t qlge_isr(int irq, void *dev_id)
 
 static int ql_tso(struct sk_buff *skb, struct ob_mac_tso_iocb_req *mac_iocb_ptr)
 {
-
 	if (skb_is_gso(skb)) {
 		int err;
 		__be16 l3_proto = vlan_get_protocol(skb);
@@ -2885,7 +2878,6 @@ static void ql_free_rx_resources(struct ql_adapter *qdev,
 static int ql_alloc_rx_resources(struct ql_adapter *qdev,
 				 struct rx_ring *rx_ring)
 {
-
 	/*
 	 * Allocate the completion queue for this rx_ring.
 	 */
@@ -3814,7 +3806,6 @@ static int ql_wol(struct ql_adapter *qdev)
 
 static void ql_cancel_all_work_sync(struct ql_adapter *qdev)
 {
-
 	/* Don't kill the reset worker thread if we
 	 * are in the process of recovery.
 	 */
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/3 staging: qlge: Properly indent a multiline comment

In reply to Soumyajit Deb

Move the end of multiline comment "*/" to the next line to improve code readability and to adhere to the Linux Kernel coding style. Reported by checkpatch.pl

---
 drivers/staging/qlge/qlge_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/qlge/qlge_main.c +2 -1
index fa697fe4fb77..008dd31b9e48 100644
@@ -3251,7 +3251,8 @@ static void ql_set_irq_mask(struct ql_adapter *qdev, struct intr_context *ctx)
 		 */
 		ctx->irq_mask = (1 << qdev->rx_ring[vect].cq_id);
 		/* Add the TX ring(s) serviced by this vector
-		 * to the mask. */
+		 * to the mask.
+		 */
 		for (j = 0; j < tx_rings_per_vector; j++) {
 			ctx->irq_mask |=
 			(1 << qdev->rx_ring[qdev->rss_ring_count +
Signature · 1 line
2.17.1
#4 lore raw
In reply to Soumyajit Deb
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

Thank you

Quoted 1 line
maintainer
#5 lore raw
Quoted 18 lines · Soumyajit Deb
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

2 days response time is _very_ fast for patches. Please note that this is the middle of the merge window upstream, so my response time will be longer...

thanks,

greg k-h

#6 lore raw
Quoted 26 lines · Greg KH
Quoted 18 lines · Soumyajit Deb
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

Quoted 7 lines

2 days response time is _very_ fast for patches. Please note that this is the middle of the merge window upstream, so my response time will be longer...

thanks,

greg k-h

Okay, no problem.

Thank you.

--
Soumyajit

#7 lore raw
In reply to Soumyajit Deb

Hi Soumyajit,

Quoted 18 lines · On Wed, 1 Apr 2020 14:28:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1  
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

I haven't reviewed this series because I'm confused. You later sent a series:

Subject: [Outreachy kernel] [Outreachy] [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl
Date: Wed, 1 Apr 2020 12:21:18 +0530
Message-Id: <[email protected]>

...how are those different? Which one should I review?

Signature · 1 line
Stefano
#8 lore raw
Quoted 30 lines · Stefano Brivio

Hi Soumyajit,

Quoted 18 lines · On Wed, 1 Apr 2020 14:28:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1  
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

Quoted 12 lines

I haven't reviewed this series because I'm confused. You later sent a series:

Subject: [Outreachy kernel] [Outreachy] [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl
Date: Wed, 1 Apr 2020 12:21:18 +0530
Message-Id: <[email protected]>

...how are those different? Which one should I review?

Signature · 1 line
Stefano

Hii Stefano,

Both patch series are different. The patch series which was sent on 28th March was for the file qlge_main.c in the qlge driver. While the patch series sent on 1st April is the
patch series which was formed by clustering previous individual patches
for the file qlge_mpi.c in the same qlge driver as suggested by you
eariler.

So, both the patch series are different and they effect different files in the same driver.

Please review both the patch series.

Thank you

--
Soumyajit

#9 lore raw
Quoted 45 lines · On Thu, 2 Apr 2020 18:13:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 30 lines · Stefano Brivio

Hi Soumyajit,

Quoted 18 lines · On Wed, 1 Apr 2020 14:28:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1    
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

Quoted 12 lines

I haven't reviewed this series because I'm confused. You later sent a series:

Subject: [Outreachy kernel] [Outreachy] [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl
Date: Wed, 1 Apr 2020 12:21:18 +0530
Message-Id: <[email protected]>

...how are those different? Which one should I review?

Signature · 1 line
Stefano

Hii Stefano,

Quoted 8 lines

Both patch series are different. The patch series which was sent on 28th March was for the file qlge_main.c in the qlge driver. While the patch series sent on 1st April is the
patch series which was formed by clustering previous individual patches
for the file qlge_mpi.c in the same qlge driver as suggested by you
eariler.

So, both the patch series are different and they effect different files in the same driver.

Okay, but in general, that's not a good reason to have separate patchsets. The difference should be in the topic of the series.

At this point there are three "active" patchsets for qlge from you:

[PATCH 0/3] staging: qlge: Resolve various warnings issued by checkpatch.pl [PATCH] staging: qlge: Properly indent the multiline comments [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl

"issued" and "reported" are synonyms, which would seem to indicate those are conceptually the same type of changes.

I think the second patchset (with one single patch) was then incorporated into the third one, but the third one doesn't mention it in the changelog, and you didn't explicitly say it should be discarded.

Mind that reviewers are people and, while we can use some interpretation, things need to be sufficiently clear. Given the subjects of the active series, I'm really lost. I could decide to review first and third patchsets, but still I don't understand why they are separated.

Signature · 1 line
Stefano
#10 lore raw
Quoted 73 lines · Stefano Brivio
Quoted 45 lines · On Thu, 2 Apr 2020 18:13:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 30 lines · Stefano Brivio

Hi Soumyajit,

Quoted 18 lines · On Wed, 1 Apr 2020 14:28:12 +0530 Soumyajit Deb <[email protected]>…
Quoted 6 lines · Soumyajit Deb

This patchset resolve coding style and indentation issues reported by checkpatch.pl
This patchset add space around various binary operators, remove extra unnecessary blank lines and properly indent a multiline comment for the same file qlge_main.c present under drivers/staging/qlge directory.

Quoted 10 lines

Soumyajit Deb (3):
staging: qlge: Add space around operators
staging: qlge: Remove extra blank lines
staging: qlge: Properly indent a multiline comment

 drivers/staging/qlge/qlge_main.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.17.1    
Quoted 6 lines

I have submitted this patcset on 28 March but I haven't recieved any review on this.
Is there anything wrong with this patchset?

Please let me know, so I can correct them and resend the patches if needed.

Quoted 12 lines

I haven't reviewed this series because I'm confused. You later sent a series:

Subject: [Outreachy kernel] [Outreachy] [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl
Date: Wed, 1 Apr 2020 12:21:18 +0530
Message-Id: <[email protected]>

...how are those different? Which one should I review?

Signature · 1 line
Stefano

Hii Stefano,

Quoted 8 lines

Both patch series are different. The patch series which was sent on 28th March was for the file qlge_main.c in the qlge driver. While the patch series sent on 1st April is the
patch series which was formed by clustering previous individual patches
for the file qlge_mpi.c in the same qlge driver as suggested by you
eariler.

So, both the patch series are different and they effect different files in the same driver.

Okay, but in general, that's not a good reason to have separate patchsets. The difference should be in the topic of the series.

At this point there are three "active" patchsets for qlge from you:

[PATCH 0/3] staging: qlge: Resolve various warnings issued by checkpatch.pl [PATCH] staging: qlge: Properly indent the multiline comments [PATCH 0/2] staging: qlge: Resolve various warnings reported by checkpatch.pl

"issued" and "reported" are synonyms, which would seem to indicate those are conceptually the same type of changes.

I think the second patchset (with one single patch) was then incorporated into the third one, but the third one doesn't mention it in the changelog, and you didn't explicitly say it should be discarded.

Quoted 8 lines

Mind that reviewers are people and, while we can use some interpretation, things need to be sufficiently clear. Given the subjects of the active series, I'm really lost. I could decide to review first and third patchsets, but still I don't understand why they are separated.

Signature · 1 line
Stefano

Hi Stefano,

Right now, I am also having trouble keeping track of all the patches and recieving multiple feedbacks from different reviewers for the same set of patchsets is confusing me too. I guess this patchset has created confusion for everybody.

Please discard these patchsets.

I will resend these patchsets in a more organised and sensible manner.

Thank you
--
Soumyajit

Quoted 1 line