[PATCH 5/6] kernel-doc: use no-doc option

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <akpm@...>, Johannes Berg <johannes@...>, <sam@...>
Date: Wednesday, October 24, 2007 - 6:08 pm

From: Johannes Berg <johannes@sipsolutions.net>

When asked by a template to include all functions from a file,
it will also include DOC: sections wreaking havoc in the generated
docbook file. This patch makes it use the new -no-doc-sections
flag for kernel-doc to avoid this.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

---
 scripts/basic/docproc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.23-git19.orig/scripts/basic/docproc.c
+++ linux-2.6.23-git19/scripts/basic/docproc.c
@@ -65,6 +65,7 @@ FILELINE * entity_system;
 #define DOCBOOK       "-docbook"
 #define FUNCTION      "-function"
 #define NOFUNCTION    "-nofunction"
+#define NODOCSECTIONS "-no-doc-sections"
 
 char *srctree;
 
@@ -231,13 +232,14 @@ void docfunctions(char * filename, char 
 
 	for (i=0; i <= symfilecnt; i++)
 		symcnt += symfilelist[i].symbolcnt;
-	vec = malloc((2 + 2 * symcnt + 2) * sizeof(char*));
+	vec = malloc((2 + 2 * symcnt + 3) * sizeof(char*));
 	if (vec == NULL) {
 		perror("docproc: ");
 		exit(1);
 	}
 	vec[idx++] = KERNELDOC;
 	vec[idx++] = DOCBOOK;
+	vec[idx++] = NODOCSECTIONS;
 	for (i=0; i < symfilecnt; i++) {
 		struct symfile * sym = &symfilelist[i];
 		for (j=0; j < sym->symbolcnt; j++) {


-- 

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Wed Oct 24, 6:08 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Sam Ravnborg, (Fri Oct 26, 4:18 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 1:29 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Randy Dunlap, (Thu Oct 25, 1:36 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Thu Oct 25, 3:21 pm)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 6:48 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Matt Mackall, (Fri Oct 26, 10:46 am)
Re: [PATCH 0/6] kernel-doc: add DOC: sections support, Johannes Berg, (Fri Oct 26, 4:32 pm)
[PATCH 3/6] kernel-doc: single DOC: selection, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 2/6] kernel-doc: init kernel version, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 4/6] kernel-doc: process functions, not DOC:, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 5/6] kernel-doc: use no-doc option, Randy Dunlap, (Wed Oct 24, 6:08 pm)
[PATCH 1/6] kernel-doc: fix xml output mode, Randy Dunlap, (Wed Oct 24, 6:08 pm)