[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49629CCA.90405@oracle.com>
Date: Mon, 05 Jan 2009 15:50:34 -0800
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Timur Tabi <timur@...escale.com>
CC: lkml <linux-kernel@...r.kernel.org>
Subject: Re: Can kernel-doc process simple macros?
Timur Tabi wrote:
> How can I get kernel-doc to document a line like this:
>
> #define MY_CONSTANT 10
>
> The documentation doesn't say anything about macros, but Google
> searches imply that there is some support for macros in kernel-doc.
kernel-doc supports macros that look like functions. E.g., from
include/linux/kernel.h:
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.
* @type: the type of the container struct this is embedded in.
* @member: the name of the member within the struct.
*
*/
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
However, it does not supports simple macros that are just value names
like your example. But it does support enums, so you could possibly
change the #defined values to enums and have kernel-doc for them.
Or we could see what it would take to support simple macro values
in kernel-doc...
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists