Received: by 10.192.165.148 with SMTP id m20csp641565imm; Fri, 27 Apr 2018 05:15:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8Vn0nmMcSiCqnv3z9TQdk0K0a/RZnir7kL7yLIyqOcPzFyIRCLP0jN3cVmZyy7w7K2Ith X-Received: by 2002:a63:b406:: with SMTP id s6-v6mr2027111pgf.334.1524831340324; Fri, 27 Apr 2018 05:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524831340; cv=none; d=google.com; s=arc-20160816; b=CswsSgg838glUyjiswanDlz5VsjpFmgh/+wzJcx6TkDWWnwAjHXN6N/figYxpLA6B4 kWgM7kfb+g4+YBzpeJLiY59bT8+6FL65HKfzp0ER14ESCuvOyarz0Ro0pBpWI+nm2E2t h8phpDKBwmk5INUYFkdIPwpOpWfYM6K/mvc5YsAk8b4svH9p7201TPC7L7ldoKYuaMLs cpl+jVjJPGLXRz4swcY4iOfw82fPdO/JDnokWVlEIv8sfOxbyQEpHvTsxu2jAToUxQQ/ +7tggG1CzUQ/9leyJBbzkh89g4Fu7EfJkCSWxkOLxeF7XPfPE7Fa0xCAQ3EwUKfL/9dx 29tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=o3TwZ0alSMQzRcr8UBWr9QrLLUuVhpvn62pEf77RkAM=; b=Qkht+71CBL+viiv/goXHi+NEmPjzmUpvZSvL56mCFIpdfSwoRrZ44RF4JSYw7yddzr A7vo/a+SlyEFgXuAxLbHDyhk/YD2sI7cqsUklUOuV6JGFZQx70O/ajXj8eO/4zKdRz5I r8l9g/B3Pk77i6R137Kq9xgMlTvaKiyhQdv9Z4GWYT0jrIyPlKor79CpxvEhtKmeJUee LvL7lqabAM58lYQlgkP0kJIFuvaTV7yZWxHzFzTU517nfof+McsAo1HElUWi2xsORp1N MPe+JS/4sgaOc6lW3+McIvH8P9z4NAJqZdH7UfmO/VDWF3CQWlOc1sHiar6M6b+YvVxi L9PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d123-v6si1104084pgc.445.2018.04.27.05.15.25; Fri, 27 Apr 2018 05:15:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758264AbeD0MNw (ORCPT + 99 others); Fri, 27 Apr 2018 08:13:52 -0400 Received: from www62.your-server.de ([213.133.104.62]:36567 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757999AbeD0MNu (ORCPT ); Fri, 27 Apr 2018 08:13:50 -0400 Received: from [62.202.221.10] (helo=linux.home) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1fC2Fv-0008Lv-JX; Fri, 27 Apr 2018 14:13:39 +0200 Subject: Re: [tip:x86/cleanups] x86/bpf: Clean up non-standard comments, to make the code more readable To: peterz@infradead.org, edumazet@google.com, davem@davemloft.net, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, ast@fb.com, bp@alien8.de, hpa@zytor.com, mingo@kernel.org, yoshfuji@linux-ipv6.org, tglx@linutronix.de, linux-tip-commits@vger.kernel.org, netdev@vger.kernel.org References: From: Daniel Borkmann Message-ID: <44202670-ed43-366b-caf2-f72863ee7c6a@iogearbox.net> Date: Fri, 27 Apr 2018 14:13:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.3/24517/Fri Apr 27 06:24:46 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > AuthorDate: Fri, 27 Apr 2018 11:54:40 +0200 > Committer: Ingo Molnar > 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 > Cc: Peter Zijlstra > Cc: Borislav Petkov > Cc: H. Peter Anvin > Cc: Linus Torvalds > Cc: David S. Miller > Cc: Eric Dumazet > Cc: Daniel Borkmann > Cc: Alexei Starovoitov > Cc: Hideaki YOSHIFUJI > Cc: netdev@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Ingo Molnar Acked-by: Daniel Borkmann Thanks, Daniel