lkml.org 
[lkml]   [2018]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC: Coding Style] Best way to split a long function declaration with modifiers
Date
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

\
 
 \ /
  Last update: 2018-05-12 17:20    [W:0.043 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site