Page MenuHomeFreeBSD

Remove superfluous trailing whitespaces in TCP source files
ClosedPublic

Authored by rscheff on Dec 6 2019, 9:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 4:37 PM
Unknown Object (File)
Dec 20 2023, 2:07 AM
Unknown Object (File)
Dec 10 2023, 12:42 PM
Unknown Object (File)
Nov 26 2023, 9:03 AM
Unknown Object (File)
Nov 23 2023, 1:13 AM
Unknown Object (File)
Nov 23 2023, 1:11 AM
Unknown Object (File)
Nov 23 2023, 1:07 AM
Unknown Object (File)
Nov 23 2023, 12:23 AM
Subscribers
None

Details

Summary

Just a huge scrub of trailing whitespaces (may have missed
some with '/* ' using 'grep -r -n "\s$" *').

Affects mostly comments, but a few trailing space and tabs in code lines also.

No code change, no functional change.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28005
Build 26164: arc lint + arc unit

Event Timeline

rscheff added reviewers: rgrimes, tuexen, rrs.
rscheff edited the summary of this revision. (Show Details)
  • 2nd pass scrub for trailing spaces

When I did similar things in the past, one comment I received was that this does not improve the functionality, but
might make MFCing harder... However, only dealing with this in a single commit is definitely a good idea in my view.
The question is whether to do it at all. Maybe rrs@ or rgrimes@ have an opinion on this.

Why would cleaning up trailing whitespaces make MFCing harder? Other than possibly adding one adjacent line?

I made this huge diff, because sneaking these in one-by-one whenever I encounter them around the lines I was modifying was shot down so far ;)

BTW - since lint was removed, what other tool could I use to validate the fbsd code style(9)? Any hint as to how i could integrate that into git or arcanist would be appreciated.

In D22704#496723, @rscheff_gmx.at wrote:

Why would cleaning up trailing whitespaces make MFCing harder? Other than possibly adding one adjacent line?

If you don't MFC the whitespace cleanup, you might get merge conflicts...

I made this huge diff, because sneaking these in one-by-one whenever I encounter them around the lines I was modifying was shot down so far ;)

As I said, doing this once is a nice thing in my opinion...

BTW - since lint was removed, what other tool could I use to validate the fbsd code style(9)? Any hint as to how i could integrate that into git or arcanist would be appreciated.

I"m not doing this automated... I just try to follow it (as much as I think is a good thing) when coding... But this is not perfect and others are also not perfect.

I am happy with one commit that cleans it all up :)

This revision is now accepted and ready to land.Dec 17 2019, 3:43 PM

This patch was generated mostly manually, with

grep "[ \t]*$" tcp*

And validating that the found trailing whitespaces were true positive matches.

running

sed 's/[ \t]*$//' < file

should give a similar result.

I concur that one large commit is best, BUTT, we should also see how it merges before doing that, as I suspect a large amount of this well fail to merge, and that creates a merge nightmare. As one who shoots down white space fixes within your other reviews let me try to expand on reasoning. It is not that it is bad or wrong to fix white space, it is that it adds noise to a review and each white space change has to be looked at as if it was part of the functional change and that creates reviewer work load and sometimes also causes mistakes to slip by.

Please try to make sure that this can be merged to at least stable/12 cleanly before committing to head/.

rrs took no prisoners, and cleaned up all trailing whitespaces all over the place (even more extensively, as this Diff was only fixing up tcp_*).
With the referenced commits, everything in sys/netinet/*, cc/*, tcp_stacks/* has been addressed and no more trailing whitespaces can be found yet.

Closing this diff.