Re: Question on kernel-docs comment syntax.

From: Randy Dunlap
Date: Mon Mar 19 2012 - 15:52:01 EST


On 03/19/2012 11:04 AM, Ben Greear wrote:

> I'd like to add some kdocs comment such that it creates a link
> to another struct (in another file/subsystem).
>
> * @get_et_stats: Ethtool API to get a set of u64 stats.
> * See @ethtool_ops
>
> The above does NOT appear to work as I would hope.
>
> I've had no luck finding documentation for the syntax....
> anyone have a pointer to a proper web page or document?
>
> Thanks,
> Ben

The only documentation for kernel-doc syntax that I know of
is in Documentation/kernel-doc-nano-HOWTO.txt .

'@' is used as a prefix for function parameters.
'&' is used as a prefix for structs.

Copying that file's text:

'funcname()' - function
'$ENVVAR' - environment variable
'&struct_name' - name of a structure (up to two words including 'struct')
'@parameter' - name of a parameter
'%CONST' - name of a constant.


HTH.
--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/