All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Sathya.Perla@Emulex.Com
Cc: netdev@vger.kernel.org
Subject: Re: coding style question on indentation
Date: Fri, 01 Jul 2011 08:23:13 -0700	[thread overview]
Message-ID: <1309533793.7277.51.camel@Joe-Laptop> (raw)
In-Reply-To: <3367B80B08154D42A3B2BC708B5D41F63F87EF145E@EXMAIL.ad.emulex.com>

On Fri, 2011-07-01 at 04:20 -0700, Sathya.Perla@Emulex.Com wrote:
> a) Aligning the next line with the first argument by inserting a few spaces after the tabs - as in:
> 
> 	dma_unmap_page(&adapter->pdev->dev,
> 			   dma_unmap_addr(rx_page_info, bus),
> 			   adapter->big_page_size, DMA_FROM_DEVICE);

My preference as well, but your example may not be correct.

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.

It is your code though, do what you think best.



  parent reply	other threads:[~2011-07-01 15:23 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 [this message]
2011-07-05 19:54   ` Chris Friesen
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=1309533793.7277.51.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=Sathya.Perla@Emulex.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.