From: Joe Perches <joe@perches.com>
To: Chris Friesen <chris.friesen@genband.com>
Cc: Sathya.Perla@Emulex.Com, netdev@vger.kernel.org
Subject: Re: coding style question on indentation
Date: Tue, 05 Jul 2011 13:01:20 -0700 [thread overview]
Message-ID: <1309896081.18925.73.camel@Joe-Laptop> (raw)
In-Reply-To: <4E136C0C.8010806@genband.com>
On Tue, 2011-07-05 at 13:54 -0600, Chris Friesen wrote:
> On 07/01/2011 09:23 AM, Joe Perches wrote:
> > I think this better:
> > 1 2 3 4 5 6 7 8
> > 12345678901234567890123456789012345678901234567890123456789012345678901234567890
> > dma_unmap_page(&adapter->pdev->dev, dma_unmap_addr(rx_page_info, bus),
> > adapter->big_page_size, DMA_FROM_DEVICE);
> > maximally fill to 80 cols, then wrap with maximal tabs using spaces
> > if necessary to align args after opening parenthesis.
> > In this case, 2 tabs, 7 spaces.
> I think the most flexible is to use hard tabs to align the continued
> line to the same level of indentation as the parent line, then use
> spaces for "pretty" alignment. That way, it all lines up regardless of
> how many spaces the viewer has set for the equivalent size of hard tabs.
True, but none of the common editing tools do this.
You could produce and publish emacs/vi modes for this
and then teach checkpatch to understand this mode and
not complain about the spacing if it matters that much
to you.
prev parent reply other threads:[~2011-07-05 20:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 11:20 coding style question on indentation Sathya.Perla
2011-07-01 11:52 ` Ben Hutchings
2011-07-01 15:23 ` Joe Perches
2011-07-05 19:54 ` Chris Friesen
2011-07-05 20:01 ` Joe Perches [this message]
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=1309896081.18925.73.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=Sathya.Perla@Emulex.Com \
--cc=chris.friesen@genband.com \
--cc=netdev@vger.kernel.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