[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2c734d3-ca8d-8485-9b9e-fd64e12aa0f0@linux.ibm.com>
Date: Fri, 13 Sep 2019 07:41:55 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Dan Williams <dan.j.williams@...el.com>
Cc: Dave Jiang <dave.jiang@...el.com>, linux-nvdimm@...ts.01.org,
Vishal Verma <vishal.l.verma@...el.com>,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [Ksummit-discuss] [PATCH v2 3/3] libnvdimm, MAINTAINERS:
Maintainer Entry Profile
On 9/12/19 12:13 AM, Dan Carpenter wrote:
> On Wed, Sep 11, 2019 at 08:48:59AM -0700, Dan Williams wrote:
>> +Coding Style Addendum
>> +---------------------
>> +libnvdimm expects multi-line statements to be double indented. I.e.
>> +
>> + if (x...
>> + && ...y) {
>
> That looks horrible and it causes a checkpatch warning. :( Why not
> do it the same way that everyone else does it.
>
> if (blah_blah_x && <-- && has to be on the first line for checkpatch
> blah_blah_y) { <-- [tab][space][space][space][space]blah
>
> Now all the conditions are aligned visually which makes it readable.
> They aren't aligned with the indent block so it's easy to tell the
> inside from the if condition.
I came across this while sending patches to libnvdimm subsystem. W.r.t
coding Style can we have consistent styles across the kernel? Otherwise,
one would have to change the editor settings as they work across
different subsystems in the kernel. In this specific case both
clang-format and emacs customization tip in the kernel documentation
directory suggest the later style.
-aneesh
Powered by blists - more mailing lists