LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC: Coding Style] Best way to split a long function declaration with modifiers
@ 2018-05-12 15:19 Igor Stoppa
  2018-05-12 15:41 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Igor Stoppa @ 2018-05-12 15:19 UTC (permalink / raw)
  To: Jonathan Corbet, linux-kernel

Hi,
I have been wondering if it's ok to break a long (function declaration) 
line in the following way:

static __always_inline
struct foo_bar *__get_foo_bar(type1 parm1, type2 parm2, type3 parm3)


instead of:

static __always_inline struct foo_bar *__get_foo_bar(type1 parm1,
						     type2 parm2,
						     type3 parm3)


I personally like more the former, not to mention that it uses also one 
line less, but it seems less common in the sources.
The coding style references do not seem to say anything explicit about 
which style to prefer.

And not all the code in the kernel is of the same quality, so finding an 
example doesn't automatically mean that it's a good practice to follow :-)

--
thanks, igor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-12 16:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-12 15:19 [RFC: Coding Style] Best way to split a long function declaration with modifiers Igor Stoppa
2018-05-12 15:41 ` Joe Perches
2018-05-12 16:10   ` Igor Stoppa
     [not found]   ` <CAH2bzCT0BhTy6-hTkaevt1VyYaZpq=AvF6cRpPHs=tzzU76twg@mail.gmail.com>
2018-05-12 16:24     ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).