Skip to contentSkip to conversation

staging: qlge: Fixed extra indentation in qlget_get_stats()

PATCH In review Jarrett Knauer 2 participants 4 messages Feb 9, 2020 – Feb 11, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: qlge: Fixed extra indentation in qlget_get_stats()

qlge TODO cited weird indentation all over qlge files, with qlget_get_stats() as an example. With this fix the TODO will need to be updated as well.

This is also a re-submission, as I incorrectly sent my first patch directly to the maintainers instead of to the correct mailing list. Apologies.

---
 drivers/staging/qlge/qlge_main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/qlge/qlge_main.c +8 -8
index ef8037d0b52e..a56bd69afd35 100644
@@ -4123,11 +4123,11 @@ static struct net_device_stats *qlge_get_stats(struct net_device
 	/* Get RX stats. */
 	pkts = mcast = dropped = errors = bytes = 0;
 	for (i = 0; i < qdev->rss_ring_count; i++, rx_ring++) {
-			pkts += rx_ring->rx_packets;
-			bytes += rx_ring->rx_bytes;
-			dropped += rx_ring->rx_dropped;
-			errors += rx_ring->rx_errors;
-			mcast += rx_ring->rx_multicast;
+		pkts += rx_ring->rx_packets;
+		bytes += rx_ring->rx_bytes;
+		dropped += rx_ring->rx_dropped;
+		errors += rx_ring->rx_errors;
+		mcast += rx_ring->rx_multicast;
 	}
 	ndev->stats.rx_packets = pkts;
 	ndev->stats.rx_bytes = bytes;
@@ -4138,9 +4138,9 @@ static struct net_device_stats *qlge_get_stats(struct net_device
 	/* Get TX stats. */
 	pkts = errors = bytes = 0;
 	for (i = 0; i < qdev->tx_ring_count; i++, tx_ring++) {
-			pkts += tx_ring->tx_packets;
-			bytes += tx_ring->tx_bytes;
-			errors += tx_ring->tx_errors;
+		pkts += tx_ring->tx_packets;
+		bytes += tx_ring->tx_bytes;
+		errors += tx_ring->tx_errors;
 	}
 	ndev->stats.tx_packets = pkts;
 	ndev->stats.tx_bytes = bytes;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · Jarrett Knauer

qlge TODO cited weird indentation all over qlge files, with qlget_get_stats() as an example. With this fix the TODO will need to be updated as well.

This is also a re-submission, as I incorrectly sent my first patch directly to the maintainers instead of to the correct mailing list. Apologies.

If you really want to fix this, I would suggest to go over all of the driver at once. Then you can remove the TODO entry.

#2 lore raw
Quoted 10 lines · Benjamin Poirier
Quoted 7 lines · Jarrett Knauer

qlge TODO cited weird indentation all over qlge files, with qlget_get_stats() as an example. With this fix the TODO will need to be updated as well.

This is also a re-submission, as I incorrectly sent my first patch directly to the maintainers instead of to the correct mailing list. Apologies.

If you really want to fix this, I would suggest to go over all of the driver at once. Then you can remove the TODO entry.

I can do this. Would it be best for me to re-submit this patch in a series of patches with each indentation fix that I go through + a cover letter for the series?

#3 lore raw
Quoted 6 lines · Jarrett Knauer
Quoted 5 lines · Benjamin Poirier
Quoted 4 lines · Jarrett Knauer

qlge TODO cited weird indentation all over qlge files, with qlget_get_stats() as an example. With this fix the TODO will need to be updated as well.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

This is also a re-submission, as I incorrectly sent my first patch directly to the maintainers instead of to the correct mailing list. Apologies.

If you really want to fix this, I would suggest to go over all of the driver at once. Then you can remove the TODO entry.

I can do this. Would it be best for me to re-submit this patch in a series of patches with each indentation fix that I go through + a cover letter for the series?

A quick run of clang-format shows:

5 files changed, 2305 insertions(+), 2407 deletions(-)

Many of those are unneeded but I guess it will still be a lot of changes.

There is not much benefit to splitting each small indentation fix into separate patches: it doesn't help to understand the patch, it doesn't help bisectability, it's debatable that they are logically distinct changes.

If you want, you could split them into topics like "fix code formatting in enum/struct definitions/function bodies/preprocessor directives/... Then again, if the overall changes turn out not to be that large, a single patch would be fine I think.

Please make sure to read Documentation/process/coding-style.rst; that doesn't go into every small detail and some things are up to the preference of whoever wrote the code. In case of doubt, I'd suggest to look at other drivers in drivers/net/ethernet/ that are not too old:
ice, ionic, sfc, mlx5, ...