linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-nvdimm <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH 00/13] nvdimm: Use more common kernel coding style
Date: Thu, 12 Sep 2019 15:15:06 -0700	[thread overview]
Message-ID: <2e3b15aea8645f38cea9442a4b6eb95f5b33eec6.camel@perches.com> (raw)
In-Reply-To: <CANiq72mgbepmw=G5pM7iSRf-Eob7AHFzLw=76uFivpNGtccyKw@mail.gmail.com>

On Thu, 2019-09-12 at 23:58 +0200, Miguel Ojeda wrote:
> On Thu, Sep 12, 2019 at 11:08 PM Joe Perches <joe@perches.com> wrote:
> > Please name the major projects and then point to their
> > .clang-format equivalents.
> > 
> > Also note the size/scope/complexity of the major projects.
> 
> Mozilla, WebKit, LLVM and Microsoft. They have their style distributed
> with the official clang-format, not sure if they enforce it.
> 
> Same for Chromium/Chrome, but it looks like they indeed enforce it:

thanks for that list.

> > I used the latest one, and quite a bit of the conversion
> > was unpleasant to read.
> 
> It would be good to see particularly bad snippets to see if we can do
> something about them (and, if needed, try to improve clang-format to
> support whatever we need).

As I mentioned earlier, look at the __stringify conversion.
Also the C() blocks.

btw: emacs 'mark-whole-buffer indent-region',
the tool I used for each file in patch 1, also
made a mess of the C() block.

> Did you tweak the parameters with the new ones?

No.  I used

$ clang-format --version
clang-format version 10.0.0 (git://github.com/llvm/llvm-project.git 305b961f64b75e73110e309341535f6d5a48ed72)

and the existing .clang_format from
next-20190904 35394d031b710e832849fca60d0f53b513f0c390

> I am preparing an RFC
> patch for an updated .clang-format configuration that improves quite a
> bit the results w.r.t. to the current one (and allows for some leeway
> on the developer's side, which helps prevent some cases too).

Well, one day no doubt an automated tool will be
more useful for the kernel.  Hope you keep at it
and good luck.

> > Marking sections _no_auto_format_ isn't really a
> > good solution is it?
> 
> I am thinking about special tables that are hand-crafted or very
> complex macros. For those, yes, I think it is a fine solution. That is
> why clang-format has that feature to begin with, and you can see an
> example in Mozilla's style guide which points here:
> 
>   https://github.com/mozilla/gecko-dev/blob/master/xpcom/io/nsEscape.cpp#L22
> 
> Cheers,
> Miguel

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2019-09-12 22:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  2:54 [PATCH 00/13] nvdimm: Use more common kernel coding style Joe Perches
2019-09-12  2:54 ` [PATCH 01/13] nvdimm: Use more typical whitespace Joe Perches
2019-09-12 12:17   ` Christoph Hellwig
2019-09-12 15:01     ` Joe Perches
2019-09-16  7:07       ` Christoph Hellwig
2019-09-12  2:54 ` [PATCH 02/13] nvdimm: Move logical continuations to previous line Joe Perches
2019-09-12  2:54 ` [PATCH 03/13] nvdimm: Use octal permissions Joe Perches
2019-09-12  2:54 ` [PATCH 04/13] nvdimm: Use a more common kernel spacing style Joe Perches
2019-09-12  2:54 ` [PATCH 05/13] nvdimm: Use "unsigned int" in preference to "unsigned" Joe Perches
2019-09-12  2:54 ` [PATCH 06/13] nvdimm: Add and remove blank lines Joe Perches
2019-09-12  2:54 ` [PATCH 07/13] nvdimm: Use typical kernel brace styles Joe Perches
2019-09-12  2:54 ` [PATCH 08/13] nvdimm: Use typical kernel style indentation Joe Perches
2019-09-12  2:54 ` [PATCH 09/13] nvdimm: btt.h: Neaten #defines to improve readability Joe Perches
2019-09-12  2:54 ` [PATCH 10/13] nvdimm: namespace_devs: Move assignment operators Joe Perches
2019-09-12  2:54 ` [PATCH 11/13] nvdimm: Use more common logic testing styles and bare ; positions Joe Perches
2019-09-12  3:52   ` Verma, Vishal L
2019-09-12  2:54 ` [PATCH 12/13] nvdimm: namespace_devs: Change progess typo to progress Joe Perches
2019-09-12  2:54 ` [PATCH 13/13] nvdimm: Miscellaneous neatening Joe Perches
2019-09-12  8:00 ` [PATCH 00/13] nvdimm: Use more common kernel coding style Dan Williams
2019-09-12  8:15   ` Joe Perches
2019-09-12  8:42     ` Miguel Ojeda
2019-09-12 14:00 ` Jeff Moyer
2019-09-12 14:06   ` Johannes Thumshirn
2019-09-12 14:35     ` Dan Williams
2019-09-12 14:21   ` Miguel Ojeda
2019-09-12 21:08     ` Joe Perches
2019-09-12 21:58       ` Miguel Ojeda
2019-09-12 22:15         ` Joe Perches [this message]
2019-09-12 22:38         ` Joe Perches
2019-09-12 23:00           ` Nick Desaulniers
2019-09-12 23:07             ` Joe Perches
2019-09-12 22:58         ` Nick Desaulniers
2019-09-12 23:26         ` clang-format and 'clang-format on' and 'clang-format off' Joe Perches
2019-09-15 18:25           ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e3b15aea8645f38cea9442a4b6eb95f5b33eec6.camel@perches.com \
    --to=joe@perches.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).