lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309521158.3093.1670.camel@localhost>
Date:	Fri, 01 Jul 2011 12:52:38 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Sathya.Perla@...lex.Com
Cc:	netdev@...r.kernel.org
Subject: Re: coding style question on indentation

On Fri, 2011-07-01 at 04:20 -0700, Sathya.Perla@...lex.Com wrote:
> Hi,
> Which of the following styling is preferable when a function
> invocation spans more than one line:
> 
> 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, for what it's worth.

> Documentation/CodingStyle says "spaces are never used for indentation", but I see
> scripts/Lindent inserting spaces after tabs for alignment.

I think that's meant to apply to indentation at the start of a statement
or declaration, not when wrapping.

> OR
> 
> b) Just using tabs without needing to align as above:
> 
> 	dma_unmap_page(&adapter->pdev->dev,
> 			dma_unmap_addr(rx_page_info, bus),
> 			adapter->big_page_size, DMA_FROM_DEVICE);

Popular but ugly in my opinion.

Some people also use a single extra tab to indent after wrapping,
whether or not the line break is within a parenthesised expression or
argument list.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ