[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <44202670-ed43-366b-caf2-f72863ee7c6a@iogearbox.net>
Date: Fri, 27 Apr 2018 14:13:38 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: peterz@...radead.org, edumazet@...gle.com, davem@...emloft.net,
linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
ast@...com, bp@...en8.de, hpa@...or.com, mingo@...nel.org,
yoshfuji@...ux-ipv6.org, tglx@...utronix.de,
linux-tip-commits@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to
make the code more readable
Hi Ingo,
On 04/27/2018 01:00 PM, tip-bot for Ingo Molnar wrote:
> Commit-ID: 5f26c50143f58f256535bee8d93a105f36d4d2da
> Gitweb: https://git.kernel.org/tip/5f26c50143f58f256535bee8d93a105f36d4d2da
> Author: Ingo Molnar <mingo@...nel.org>
> AuthorDate: Fri, 27 Apr 2018 11:54:40 +0200
> Committer: Ingo Molnar <mingo@...nel.org>
> CommitDate: Fri, 27 Apr 2018 12:42:04 +0200
>
> x86/bpf: Clean up non-standard comments, to make the code more readable
>
> So by chance I looked into x86 assembly in arch/x86/net/bpf_jit_comp.c and
> noticed the weird and inconsistent comment style it mistakenly learned from
> the networking code:
>
> /* Multi-line comment ...
> * ... looks like this.
> */
>
> Fix this to use the standard comment style specified in Documentation/CodingStyle
> and used in arch/x86/ as well:
>
> /*
> * Multi-line comment ...
> * ... looks like this.
> */
>
> Also, to quote Linus's ... more explicit views about this:
>
> http://article.gmane.org/gmane.linux.kernel.cryptoapi/21066
>
> > But no, the networking code picked *none* of the above sane formats.
> > Instead, it picked these two models that are just half-arsed
> > shit-for-brains:
> >
> > (no)
> > /* This is disgusting drug-induced
> > * crap, and should die
> > */
> >
> > (no-no-no)
> > /* This is also very nasty
> > * and visually unbalanced */
> >
> > Please. The networking code actually has the *worst* possible comment
> > style. You can literally find that (no-no-no) style, which is just
> > really horribly disgusting and worse than the otherwise fairly similar
> > (d) in pretty much every way.
>
> Also improve the comments and some other details while at it:
>
> - Don't mix same-line and previous-line comment style on otherwise
> identical code patterns within the same function,
>
> - capitalize 'BPF' and x86 register names consistently,
>
> - capitalize sentences consistently,
>
> - instead of 'x64' use 'x86-64': x64 is a Microsoft specific term,
>
> - use more consistent punctuation,
>
> - use standard coding style in macros as well,
>
> - fix typos and a few other minor details.
>
> Consistent coding style is not optional, at least in arch/x86/.
>
> No change in functionality.
Thanks for the cleanup, looks fine to me!
> ( In case this commit causes conflicts with pending development code
> I'll be glad to help resolve any conflicts! )
Any objections if we would simply route this via bpf-next tree, otherwise
this will indeed cause really ugly merge conflicts throughout the JIT with
pending work.
> Acked-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Alexei Starovoitov <ast@...com>
> Cc: Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>
> Cc: netdev@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Daniel Borkmann <daniel@...earbox.net>
Thanks,
Daniel
Powered by blists - more mailing lists