Commit 2791f47d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

docs: kerneldoc.py: add support for kerneldoc -nosymbol

Currently, there's no way to exclude identifiers from
a kernel-doc markup. Add support for it.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 91fc6d8a
...@@ -490,6 +490,14 @@ identifiers: *[ function/type ...]* ...@@ -490,6 +490,14 @@ identifiers: *[ function/type ...]*
.. kernel-doc:: lib/idr.c .. kernel-doc:: lib/idr.c
:identifiers: :identifiers:
no-identifiers: *[ function/type ...]*
Exclude documentation for each *function* and *type* in *source*.
Example::
.. kernel-doc:: lib/bitmap.c
:no-identifiers: bitmap_parselist
functions: *[ function/type ...]* functions: *[ function/type ...]*
This is an alias of the 'identifiers' directive and deprecated. This is an alias of the 'identifiers' directive and deprecated.
......
...@@ -62,6 +62,7 @@ class KernelDocDirective(Directive): ...@@ -62,6 +62,7 @@ class KernelDocDirective(Directive):
'export': directives.unchanged, 'export': directives.unchanged,
'internal': directives.unchanged, 'internal': directives.unchanged,
'identifiers': directives.unchanged, 'identifiers': directives.unchanged,
'no-identifiers': directives.unchanged,
'functions': directives.unchanged, 'functions': directives.unchanged,
} }
has_content = False has_content = False
...@@ -104,6 +105,12 @@ class KernelDocDirective(Directive): ...@@ -104,6 +105,12 @@ class KernelDocDirective(Directive):
else: else:
cmd += ['-no-doc-sections'] cmd += ['-no-doc-sections']
if 'no-identifiers' in self.options:
no_identifiers = self.options.get('no-identifiers').split()
if no_identifiers:
for i in no_identifiers:
cmd += ['-nosymbol', i]
for pattern in export_file_patterns: for pattern in export_file_patterns:
for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern): for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
env.note_dependency(os.path.abspath(f)) env.note_dependency(os.path.abspath(f))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment