public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Chris Friesen <chris.friesen@genband•com>
To: Joe Perches <joe@perches•com>
Cc: Sathya.Perla@Emulex•Com, netdev@vger•kernel.org
Subject: Re: coding style question on indentation
Date: Tue, 05 Jul 2011 13:54:52 -0600	[thread overview]
Message-ID: <4E136C0C.8010806@genband.com> (raw)
In-Reply-To: <1309533793.7277.51.camel@Joe-Laptop>

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.

Chris

-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband•com
www.genband.com

  reply	other threads:[~2011-07-05 19:55 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 [this message]
2011-07-05 20:01     ` Joe Perches

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=4E136C0C.8010806@genband.com \
    --to=chris.friesen@genband$(echo .)com \
    --cc=Sathya.Perla@Emulex$(echo .)Com \
    --cc=joe@perches$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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