linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sonny Sasaka <sonnysasaka@chromium.org>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ] doc/coding-style: Allow spaces after tabs for indenting wrapped lines
Date: Thu, 22 Oct 2020 13:16:29 -0700	[thread overview]
Message-ID: <CAO271mkmWKLssFeohZhBQvyiJL6TJxeJjkr4f5tycS2kLqACeg@mail.gmail.com> (raw)
In-Reply-To: <ED6A96A4-A97A-423B-9E62-80BDA3A07164@holtmann.org>

[Ping and resending in plain text]

Hi Marcel,

Could you share the reason behind the "only tab for indentation" rule
for userspace code? I find that it is hard to format the code and it'd
be good if we adopt the kernel space style indentation as well which
increases readability and ease of code formatting.


On Thu, Oct 1, 2020 at 12:16 AM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Sonny,
>
> > The "only tabs for indentation" rule was enforced long ago to align with
> > Linux kernel net coding style. This is no longer the case today so we
> > are relaxing the coding style to allow spaces after tabs if it can
> > increase readability.
> >
> > ---
> > doc/coding-style.txt | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/doc/coding-style.txt b/doc/coding-style.txt
> > index f0bf880e3..6a7415847 100644
> > --- a/doc/coding-style.txt
> > +++ b/doc/coding-style.txt
> > @@ -104,9 +104,16 @@ void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> > void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> >                                                       btd_adapter_pin_cb_t cb)
> >
> > +5)
> > +void btd_adapter_register_pin_cb(struct btd_adapter *adapter,
> > +                              btd_adapter_pin_cb_t cb)
> > +
> > The referred style for line wrapping is to indent as far as possible to the
> > right without hitting the 80 columns limit.
> >
> > +It is acceptable to add padding with spaces after tabs to increase
> > +readability, for example to indent function arguments at the parenthesis.
> > +
>
> NAK. The userspace style is a bit different than the kernel one.
>
> Regards
>
> Marcel
>

  reply	other threads:[~2020-10-22 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 23:29 [PATCH BlueZ] doc/coding-style: Allow spaces after tabs for indenting wrapped lines Sonny Sasaka
2020-09-16 23:36 ` Luiz Augusto von Dentz
2020-10-01  7:16 ` Marcel Holtmann
2020-10-22 20:16   ` Sonny Sasaka [this message]
2020-11-09 13:01     ` Marcel Holtmann

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=CAO271mkmWKLssFeohZhBQvyiJL6TJxeJjkr4f5tycS2kLqACeg@mail.gmail.com \
    --to=sonnysasaka@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /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).