netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats()
@ 2020-02-09  7:36 Jarrett Knauer
  2020-02-10  4:31 ` Benjamin Poirier
  0 siblings, 1 reply; 4+ messages in thread
From: Jarrett Knauer @ 2020-02-09  7:36 UTC (permalink / raw)
  To: netdev; +Cc: 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.

Signed-off-by: Jarrett Knauer <jrtknauer@gmail.com>
---
 drivers/staging/qlge/qlge_main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index ef8037d0b52e..a56bd69afd35 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -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;
-- 
2.17.1


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

* Re: [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats()
  2020-02-09  7:36 [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats() Jarrett Knauer
@ 2020-02-10  4:31 ` Benjamin Poirier
  2020-02-10 18:31   ` Jarrett Knauer
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Poirier @ 2020-02-10  4:31 UTC (permalink / raw)
  To: Jarrett Knauer; +Cc: netdev

On 2020/02/09 00:36 -0700, Jarrett Knauer wrote:
> 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.

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

* Re: [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats()
  2020-02-10  4:31 ` Benjamin Poirier
@ 2020-02-10 18:31   ` Jarrett Knauer
  2020-02-11  6:50     ` Benjamin Poirier
  0 siblings, 1 reply; 4+ messages in thread
From: Jarrett Knauer @ 2020-02-10 18:31 UTC (permalink / raw)
  To: Benjamin Poirier; +Cc: netdev

On 2020-02-09 9:31 p.m., Benjamin Poirier wrote:
> On 2020/02/09 00:36 -0700, Jarrett Knauer wrote:
>> 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?

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

* Re: [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats()
  2020-02-10 18:31   ` Jarrett Knauer
@ 2020-02-11  6:50     ` Benjamin Poirier
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Poirier @ 2020-02-11  6:50 UTC (permalink / raw)
  To: Jarrett Knauer; +Cc: netdev

On 2020/02/10 11:31 -0700, Jarrett Knauer wrote:
> On 2020-02-09 9:31 p.m., Benjamin Poirier wrote:
> > On 2020/02/09 00:36 -0700, Jarrett Knauer wrote:
> >> 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?

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

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

end of thread, other threads:[~2020-02-11  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-09  7:36 [PATCH] staging: qlge: Fixed extra indentation in qlget_get_stats() Jarrett Knauer
2020-02-10  4:31 ` Benjamin Poirier
2020-02-10 18:31   ` Jarrett Knauer
2020-02-11  6:50     ` Benjamin Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).