mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
kernel-doc: improve "no structured comments found" error
When using '!Ffile function' in a docbook template, and the function no longer exists, you get a "no structured comments found" error from the kernel-doc processing script. It's useful to know which functions it was looking for, so print them out in this case. Also do the same for '!Pfile doc-section' The same error also happens when using '!Efile' when some exported functions aren't documented (in the same file.) There's a very large number of such functions though, so don't print the message in this case -- right now it would give ~850 messages. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: Rob Landley <rob@landley.net> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c7708649cc
commit
e946c43a11
2 changed files with 15 additions and 5 deletions
|
@ -72,6 +72,7 @@ FILELINE * docsection;
|
|||
#define FUNCTION "-function"
|
||||
#define NOFUNCTION "-nofunction"
|
||||
#define NODOCSECTIONS "-no-doc-sections"
|
||||
#define SHOWNOTFOUND "-show-not-found"
|
||||
|
||||
static char *srctree, *kernsrctree;
|
||||
|
||||
|
@ -294,6 +295,7 @@ static void singfunc(char * filename, char * line)
|
|||
int startofsym = 1;
|
||||
vec[idx++] = KERNELDOC;
|
||||
vec[idx++] = DOCBOOK;
|
||||
vec[idx++] = SHOWNOTFOUND;
|
||||
|
||||
/* Split line up in individual parameters preceded by FUNCTION */
|
||||
for (i=0; line[i]; i++) {
|
||||
|
@ -325,7 +327,8 @@ static void singfunc(char * filename, char * line)
|
|||
*/
|
||||
static void docsect(char *filename, char *line)
|
||||
{
|
||||
char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
|
||||
/* kerneldoc -docbook -show-not-found -function "section" file NULL */
|
||||
char *vec[7];
|
||||
char *s;
|
||||
|
||||
for (s = line; *s; s++)
|
||||
|
@ -341,10 +344,11 @@ static void docsect(char *filename, char *line)
|
|||
|
||||
vec[0] = KERNELDOC;
|
||||
vec[1] = DOCBOOK;
|
||||
vec[2] = FUNCTION;
|
||||
vec[3] = line;
|
||||
vec[4] = filename;
|
||||
vec[5] = NULL;
|
||||
vec[2] = SHOWNOTFOUND;
|
||||
vec[3] = FUNCTION;
|
||||
vec[4] = line;
|
||||
vec[5] = filename;
|
||||
vec[6] = NULL;
|
||||
exec_kernel_doc(vec);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue