From: Marcel Holtmann <marcel@holtmann.org>
To: David Miller <davem@davemloft.net>
Cc: dh.herrmann@googlemail.com, gustavo@padovan.org,
linville@tuxdriver.com, linux-bluetooth@vger.kernel.org,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Fix coding style
Date: Mon, 07 May 2012 10:06:00 -0700 [thread overview]
Message-ID: <1336410360.5970.103.camel@aeonflux> (raw)
In-Reply-To: <20120506.145304.1998242927519675381.davem@davemloft.net>
Hi Dave,
> > Whose rules are they?
>
> Find me an example in another major core subsystem, let's use
> mm/memory.c as an example as that file gets hit by a lot of people,
> that uses the multi-line conditional TAB-only crap you guys seem to
> keep using.
>
> They don't. All the examples you'll find are of the form:
>
> if (a &&
> b)
>
> not:
>
> if (a &&
> b)
except of course in zap_vma_ptes(), remap_pmd_range(), remap_pud_range()
and do_wp_page().
So we also have this one:
if ((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
(VM_WRITE|VM_SHARED))
goto reuse;
And this:
} else if (unlikely((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
(VM_WRITE|VM_SHARED))) {
What kind of style requirement is that one?
tmp = vma->vm_ops->page_mkwrite(vma, &vmf);
if (unlikely(tmp &
(VM_FAULT_ERROR | VM_FAULT_NOPAGE))) {
ret = tmp;
goto unwritable_page;
}
Have you actually looked at mm/memory.c and confirmed that it is a good
example of multi-line indentation?
When it comes to function declaration and function calls, the style in
mm/memory.c is mixed. We can start counting, but for both other
multi-line cases it seems that tab-only indentation is predominant.
Regards
Marcel
next prev parent reply other threads:[~2012-05-07 17:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-04 18:59 [PATCH] Bluetooth: Fix coding style Gustavo Padovan
2012-05-06 16:02 ` Marcel Holtmann
2012-05-06 16:36 ` David Miller
2012-05-06 17:46 ` David Herrmann
2012-05-06 18:53 ` David Miller
2012-05-07 8:14 ` Andrei Emeltchenko
2012-05-07 8:21 ` Arend van Spriel
2012-05-07 8:29 ` Andrei Emeltchenko
2012-05-07 10:06 ` Arend van Spriel
2012-05-07 15:52 ` David Miller
2012-05-07 19:49 ` Lucas De Marchi
2012-05-07 20:06 ` David Miller
2012-05-07 20:14 ` Arend van Spriel
2012-05-07 21:33 ` Marcel Holtmann
2012-05-07 21:41 ` David Miller
2012-05-07 17:06 ` Marcel Holtmann [this message]
2012-05-07 17:55 ` David Miller
2012-05-07 21:22 ` Marcel Holtmann
2012-05-07 23:24 ` Joe Perches
2012-05-07 19:40 ` Lucas De Marchi
2012-05-07 15:24 ` Gustavo Padovan
2012-05-07 15:56 ` David Miller
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=1336410360.5970.103.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=davem@davemloft.net \
--cc=dh.herrmann@googlemail.com \
--cc=gustavo@padovan.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).