I've written this patch, and it seems to work, but I don't really know
what I'm doing and I fear I may have broken something. I don't know what:
required_argument = 1
optional_arguments = 4
mean, so I don't know whether I should have adjusted them when adding
this new option.
>From 26896bd43618e30cb3563114663ad6c39cef7dc6 Mon Sep 17 00:00:00 2001
From: Matthew Wilcox <[email protected]>
Date: Thu, 26 Jan 2017 11:43:24 -0500
Subject: [PATCH] kerneldoc: Add :nodoc: option
This is functionality the perl script already has, we just need to
expose it to our rst files.
---
Documentation/sphinx/kerneldoc.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/sphinx/kerneldoc.py
b/Documentation/sphinx/kerneldoc.py
index d15e07f36881..d86d88da1d75 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -47,6 +47,7 @@ class KernelDocDirective(Directive):
optional_arguments = 4
option_spec = {
'doc': directives.unchanged_required,
+ 'nodoc': directives.unchanged,
'functions': directives.unchanged_required,
'export': directives.unchanged,
'internal': directives.unchanged,
@@ -74,6 +75,8 @@ class KernelDocDirective(Directive):
export_file_patterns = str(self.options.get('internal')).split()
elif 'doc' in self.options:
cmd += ['-function', str(self.options.get('doc'))]
+ elif 'nodoc' in self.options:
+ cmd += ['-no-doc-sections']
elif 'functions' in self.options:
for f in str(self.options.get('functions')).split():
cmd += ['-function', f]
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html