Re: [PATCH 2/2] [media] tm6000: Fix bad indentation.

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

 



That question is related to that kind of indentation generally, not only that patch.

On 12/06/2011 03:39 PM, Thierry Reding wrote:
Function parameters on subsequent lines should never be aligned with the
function name but rather be indented.
[...]
  			usb_set_interface(dev->udev,
-			dev->isoc_in.bInterfaceNumber,
-			0);
+					dev->isoc_in.bInterfaceNumber, 0);

Which kind of indentation should be used when function params are slitted to multiple lines?

In that case two tabs are used (related to function indentation).
example:
	ret= function(param1,
			param2);

Other generally used is only one tab (related to function indentation).
example:
	ret= function(param1,
		param2);

And last generally used is multiple tabs + spaces until same location where first param is meet (related to function indentation). I see that bad since use of tabs, with only spaces I see it fine. And this many times leads situation param level are actually different whilst originally idea was to put those same level.
example:
	ret= function(param1,
		      param2);


regards
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux