LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable
       [not found] <tip-5f26c50143f58f256535bee8d93a105f36d4d2da@git.kernel.org>
@ 2018-04-27 12:13 ` Daniel Borkmann
  2018-04-27 22:16   ` arch/x86/net/bpf_jit_comp conflicts. was: " Alexei Starovoitov
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Borkmann @ 2018-04-27 12:13 UTC (permalink / raw)
  To: peterz, edumazet, davem, linux-kernel, torvalds, ast, bp, hpa,
	mingo, yoshfuji, tglx, linux-tip-commits, netdev

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@kernel.org>
> AuthorDate: Fri, 27 Apr 2018 11:54:40 +0200
> Committer:  Ingo Molnar <mingo@kernel.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@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Alexei Starovoitov <ast@fb.com>
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Thanks,
Daniel

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

* arch/x86/net/bpf_jit_comp conflicts. was: [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable
  2018-04-27 12:13 ` [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable Daniel Borkmann
@ 2018-04-27 22:16   ` Alexei Starovoitov
  2018-05-02 14:21     ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Alexei Starovoitov @ 2018-04-27 22:16 UTC (permalink / raw)
  To: Daniel Borkmann, peterz, edumazet, davem, linux-kernel, torvalds,
	bp, hpa, mingo, tglx, linux-tip-commits, netdev

On 4/27/18 5:13 AM, Daniel Borkmann wrote:
> 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@kernel.org>
>> AuthorDate: Fri, 27 Apr 2018 11:54:40 +0200
>> Committer:  Ingo Molnar <mingo@kernel.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:
>>
>>
>>   > 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!

same here. thanks for the cleanup!

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

right. would be much better to route this patch via bpf-next.
Though all the changes are cleanups in comments I'm pretty sure
they will conflict with other changes we're doing.

Ingo,
could you please drop this patch from tip tree and resend it to us?
I cannot find the original patch in any public mailing list.
Only in tip-bot notification.

Personally I don't care whether bpf jit code uses networking
or non-networking style of comments, but will be happy to enforce
non-networking for this file in the future, since that seems to be the
preference.

Thanks

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

* Re: arch/x86/net/bpf_jit_comp conflicts. was: [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable
  2018-04-27 22:16   ` arch/x86/net/bpf_jit_comp conflicts. was: " Alexei Starovoitov
@ 2018-05-02 14:21     ` Daniel Borkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2018-05-02 14:21 UTC (permalink / raw)
  To: Alexei Starovoitov, peterz, edumazet, davem, linux-kernel,
	torvalds, bp, hpa, mingo, tglx, linux-tip-commits, netdev

On 04/28/2018 12:16 AM, Alexei Starovoitov wrote:
> On 4/27/18 5:13 AM, Daniel Borkmann wrote:
>> 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@kernel.org>
>>> AuthorDate: Fri, 27 Apr 2018 11:54:40 +0200
>>> Committer:  Ingo Molnar <mingo@kernel.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.
>>>   */
>>>
[...]
>>> No change in functionality.
>>
>> Thanks for the cleanup, looks fine to me!
> 
> same here. thanks for the cleanup!
> 
>>> ( 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.

Since no one hollered I've cherry picked this into bpf-next tree so that
upcoming BPF work can be rebased on top of this, thanks Ingo!

> right. would be much better to route this patch via bpf-next.
> Though all the changes are cleanups in comments I'm pretty sure
> they will conflict with other changes we're doing.
> 
> Ingo,
> could you please drop this patch from tip tree and resend it to us?
> I cannot find the original patch in any public mailing list.
> Only in tip-bot notification.
> 
> Personally I don't care whether bpf jit code uses networking
> or non-networking style of comments, but will be happy to enforce
> non-networking for this file in the future, since that seems to be the
> preference.
> 
> Thanks

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

end of thread, other threads:[~2018-05-02 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tip-5f26c50143f58f256535bee8d93a105f36d4d2da@git.kernel.org>
2018-04-27 12:13 ` [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable Daniel Borkmann
2018-04-27 22:16   ` arch/x86/net/bpf_jit_comp conflicts. was: " Alexei Starovoitov
2018-05-02 14:21     ` Daniel Borkmann

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