public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Ben Dooks <ben-linux@fluff.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel function documentation question
Date: Tue, 16 Dec 2008 13:29:41 -0800	[thread overview]
Message-ID: <49481DC5.4000404@oracle.com> (raw)
In-Reply-To: <20081216211824.GG12431@fluff.org.uk>

Ben Dooks wrote:
> The Documentation/kernel-doc-nano-HOWTO.txt says that functions
> should be documented as so:

That's an example.  There is no "should" with that example.

> /**
>  * foobar() - short function description of foobar
> 
> I notice there are a number of places that ommit the () off the
> foobar, for example:
> 
> include/linux/skbuff.h, line 461:
> 
> /**
>  *	skb_get - reference buffer
>  *	@skb: buffer to reference
> 
> where skb_get does not have ()s.

That's perfectly fine.  The "formal" syntax is given later in that file:

The format of the block comment is like this:

/**
 * function_name(:)? (- short description)?
(* @parameterx(space)*: (description of parameter x)?)*
(* a blank line)?
 * (Description:)? (Description of function)?
 * (section header: (section description)? )*
(*)?*/


and those parentheses are (confusing) grouping characters, not literals.  :(


> As a note, it seems the default debian emacs does not colour the
> function name unless it ends ().

File a bug with debian?

> Also, is there any policy on tabs vs a single space for indenting
> these comments?

Nope.  I prefer a single space, but some people seem to prefer tab(s).

~Randy

      reply	other threads:[~2008-12-16 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16 21:18 Kernel function documentation question Ben Dooks
2008-12-16 21:29 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49481DC5.4000404@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=ben-linux@fluff.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox