Re: [PATCH V6] misc: pci_endpoint_test: simplify endpoint test read and write operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sent using Zoho Mail

 ---- On Tue, 08 Feb 2022 10:21:06 -0500 Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote ----
 > 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@xxxxxxxxxx> 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
 > 

Thanks! I'll remove tabify operation in v7, the original code have no indentation code style issue.

Regards,
Li



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux