From: Bjorn Helgaas <helgaas@kernel.org>
To: Li Chen <lchen.firstlove@zohomail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Kishon Vijay Abraham I" <kishon@ti.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
"\"Krzysztof Wilczyński\"" <kw@linux.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-pci <linux-pci@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V6] misc: pci_endpoint_test: simplify endpoint test read and write operations
Date: Tue, 8 Feb 2022 09:21:06 -0600 [thread overview]
Message-ID: <20220208152106.GA476995@bhelgaas> (raw)
In-Reply-To: <17ed78f886f.d22c200668349.8594449941761827257@zohomail.com>
On Mon, Feb 07, 2022 at 11:20:15PM -0500, Li Chen wrote:
> ---- On Mon, 07 Feb 2022 12:56:13 -0500 Bjorn Helgaas <helgaas@kernel.org> wrote ----
> > On Mon, Feb 07, 2022 at 04:09:05AM -0500, Li Chen wrote:
> > > #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \
> > > - miscdev)
> > > + miscdev)
> >
> > Always indent with tabs when possible:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=v5.16#n18
> >
> > Hmm, coding-style.rst is unfortunately not very explicit about that.
> >
> > But it's obvious from the existing code in this file that things
> > should not be indented four spaces, as you did in
> > pci_endpoint_test_transfer_data().
>
> So, can I say space is not allowed in indentation? If so, I should
> not use emacs's tabify, because it will not convert 4 space to
> 8-width tab. I'm also not sure is scripts/Lindent or clang-format is
> a good choice here, they do too much changes.
I don't know how emacs, Lindent, clang-format, etc work. I *can* tell
you that in Linux code:
- indents always use tabs (width 8) when possible,
- up to 7 spaces are allowed after a tab when needed to align
something with the previous line, and
- a tab never directly follows a space.
Bjorn
next prev parent reply other threads:[~2022-02-08 15:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 10:11 [PATCH V3] misc: pci_endpoint_test: simplify endpoint test read and write operations Li Chen
2022-01-20 11:57 ` Greg Kroah-Hartman
2022-01-20 12:48 ` Li Chen
2022-01-20 12:47 ` [PATCH V4] " Li Chen
2022-01-26 18:07 ` Greg Kroah-Hartman
2022-02-07 8:42 ` [PATCH V5] " Li Chen
2022-02-07 9:09 ` [PATCH V6] " Li Chen
2022-02-07 17:56 ` Bjorn Helgaas
2022-02-08 4:20 ` Li Chen
2022-02-08 15:21 ` Bjorn Helgaas [this message]
2022-02-09 2:42 ` Li Chen
2022-02-09 2:49 ` [PATCH V7] " Li Chen
2022-05-11 16:52 ` Lorenzo Pieralisi
2022-05-12 14:07 ` Kishon Vijay Abraham I
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=20220208152106.GA476995@bhelgaas \
--to=helgaas@kernel.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@ti.com \
--cc=kw@linux.com \
--cc=lchen.firstlove@zohomail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.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