* Antti Palosaari wrote: > 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? I don't think this is documented anywhere and there are no hard rules with regard to this. I guess anything is fine as long as it is indented at all. > In that case two tabs are used (related to function indentation). > example: > ret= function(param1, > param2); I usually use that because it is my text editor's default. > Other generally used is only one tab (related to function indentation). > example: > ret= function(param1, > param2); I think that's okay as well. > 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); Whether this works or not always depends on the tab-width. I think most variations are okay here. Some people like to align them, other people don't. Thierry
Attachment:
pgp16EGme6uuG.pgp
Description: PGP signature