linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] docs: sphinx: Add support :nosymbols: to exclude specific symbols
Date: Fri,  5 Apr 2019 14:44:53 -0700	[thread overview]
Message-ID: <20190405214453.18768-5-sean.j.christopherson@intel.com> (raw)
In-Reply-To: <20190405214453.18768-1-sean.j.christopherson@intel.com>

Add :nosymbols: so that documentation of symbols can be organized in the
final output of makedocs.  For example, files that define a large number
of symbols may want to categorize their symbols.  Another example is
SGX, which introduces a uapi header that defines structs for ioctls and
for a new vDSO function[1].  Ideally, the documentation for the vDSO
struct will be placed into a different section.

[1] https://lkml.kernel.org/r/20190320162119.4469-25-jarkko.sakkinen@linux.intel.com

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 Documentation/sphinx/kerneldoc.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index c52b6caac356..d1eb1907858b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -48,6 +48,7 @@ class KernelDocDirective(Directive):
     option_spec = {
         'doc': directives.unchanged_required,
         'functions': directives.unchanged,
+        'nosymbols': directives.unchanged,
         'export': directives.unchanged,
         'internal': directives.unchanged,
     }
@@ -81,6 +82,10 @@ class KernelDocDirective(Directive):
                     cmd += ['-symbol', f]
             else:
                 cmd += ['-no-doc-sections']
+        elif 'nosymbols' in self.options:
+            symbols = self.options.get('nosymbols').split()
+            for s in symbols:
+                cmd += ['-nosymbol', s]
 
         for pattern in export_file_patterns:
             for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern):
-- 
2.21.0


      parent reply	other threads:[~2019-04-05 21:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 21:44 [PATCH 0/4] docs: add support for :nosymbols: Sean Christopherson
2019-04-05 21:44 ` [PATCH 1/4] kernel-doc: Revert "scripts/kernel-doc: Processing -nofunc for functions only" Sean Christopherson
2019-04-08 21:45   ` Jonathan Corbet
2019-04-05 21:44 ` [PATCH 2/4] kernel-doc: Rename -nofunction option to -nosymbol Sean Christopherson
2019-04-05 21:44 ` [PATCH 3/4] kernel-doc: Rename -function to -symbol Sean Christopherson
2019-04-08 10:03   ` Jani Nikula
2019-04-08 15:11     ` Sean Christopherson
2019-04-05 21:44 ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190405214453.18768-5-sean.j.christopherson@intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).