public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* Breaking lines in function headers
@ 2015-05-19 13:22 Wim de With
  2015-05-19 13:38 ` Julia Lawall
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Wim de With @ 2015-05-19 13:22 UTC (permalink / raw)
  To: kernel-janitors

What is the correct way to break lines in a function header? The coding
style guide is not very clear about it. For example:

1.
static struct very_long_struct_name
*do_something_interesting(struct *another_long_struct_name)

2.
static struct very_long_struct_name *do_something_interesting(
				struct *another_long_struct_name)

Which one of these is the correct way to do it? I see the second one
used more often, and the coding style guide states "Descendants are
always substantially shorter than the parent and are placed
substantially to the right. The same applies to function headers with a
long argument list.", so I am inclined to say it is the correct way of
doing it. But if it is, how many tabs should I use? How should I align
the arguments if the list is longer, and I need more line breaks?

Thanks

Wim



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

end of thread, other threads:[~2015-05-19 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19 13:22 Breaking lines in function headers Wim de With
2015-05-19 13:38 ` Julia Lawall
2015-05-19 14:08 ` Dan Carpenter
2015-05-19 15:14 ` Wim de With
2015-05-19 15:20 ` Dan Carpenter
2015-05-19 15:26 ` Wim de With
2015-05-19 15:39 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox