* Can kernel-doc process simple macros?
@ 2009-01-05 23:36 Timur Tabi
2009-01-05 23:50 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2009-01-05 23:36 UTC (permalink / raw)
To: lkml
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.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can kernel-doc process simple macros?
2009-01-05 23:36 Can kernel-doc process simple macros? Timur Tabi
@ 2009-01-05 23:50 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2009-01-05 23:50 UTC (permalink / raw)
To: Timur Tabi; +Cc: lkml
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-05 23:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05 23:36 Can kernel-doc process simple macros? Timur Tabi
2009-01-05 23:50 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox