1. 30 Jun, 2018 1 commit
  2. 09 Mar, 2018 1 commit
  3. 07 Mar, 2018 1 commit
  4. 31 Aug, 2017 1 commit
  5. 19 Oct, 2016 1 commit
  6. 01 Sep, 2016 1 commit
  7. 20 Jul, 2016 1 commit
  8. 10 Jun, 2016 3 commits
    • Jani Nikula's avatar
      Documentation/sphinx: add support for specifying extra export files · 03d35d9e
      Jani Nikula authored
      Let the user specify file patterns where to look for the EXPORT_SYMBOLs
      in addition to the file with kernel-doc comments. This is directly based
      on the -export-file FILE option added to kernel-doc in "kernel-doc: add
      support for specifying extra files for EXPORT_SYMBOLs", but we extend
      that with globbing patterns in the Sphinx extension.
      The file patterns are added as options to the :export: and :internal:
      arguments of the kernel-doc directive. For example, to extract the
      documentation of exported functions from include/net/mac80211.h:
      .. kernel-doc:: include/net/mac80211.h
         :export: net/mac80211/*.c
      Without the file pattern, no exported functions would be found, as the
      EXPORT_SYMBOLs are placed in the various source files under
      The matched files are also added as dependencies on the document in
      Sphinx, as they may affect the output. This is one of the reasons to do
      the globbing in the Sphinx extension instead of in scripts/kernel-doc.
      The file pattern remains optional, and is not needed if the kernel-doc
      comments and EXPORT_SYMBOLs are placed in the source file passed in as
      the main argument to the kernel-doc directive. This is the most common
      case across the kernel source tree.
      Signed-off-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>
    • Jani Nikula's avatar
      Documentation/sphinx: use a more sensible string split in kernel-doc extension · 057de5c4
      Jani Nikula authored
      Using the default str.split doesn't return empty strings like the
      current version does.
      Signed-off-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>
    • Jani Nikula's avatar
      Documentation/sphinx: remove unnecessary temporary variable · 06173fe3
      Jani Nikula authored
      Leftover cruft. No functional changes.
      Signed-off-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>
  9. 04 Jun, 2016 1 commit
    • Daniel Vetter's avatar
      doc/sphinx: Track line-number of starting blocks · d90368f2
      Daniel Vetter authored
      Design is pretty simple: kernel-doc inserts breadcrumbs with line
      numbers, and sphinx picks them up. At first I went with a sphinx
      comment, but inserting those at random places seriously upsets the
      parser, and must be filtered. Hence why this version now uses "#define
      LINEO " since one of these ever escape into output it's pretty clear
      there is a bug.
      It seems to work well, and at least the 2-3 errors where sphinx
      complained about something that was not correct in kernel-doc text the
      line numbers matched up perfectly.
      v2: Instead of noodling around in the parser state machine, create
      a ViewList and parse it ourselves. This seems to be the recommended
      way, per Jani's suggestion.
      - Split out ViewList pach. Splitting the kernel-doc changes from the
        sphinx ones isn't possible, since emitting the LINENO lines wreaks
        havoc with the rst formatting. We must filter them.
      - Improve the regex per Jani's suggestions, and compile it just once
        for speed.
      - Now that LINENO lines are eaten, also add them to function parameter
        descriptions. Much less content and offset than for in-line struct
        member descriptions, but still nice to know which exact continuation
        line upsets sphinx.
      - Simplify/clarify the line +/-1 business a bit.
      v4: Split out the scripts/kernel-doc changes and make line-numbers
      opt-in, as suggested by Jani.
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: linux-doc@vger.kernel.org
      Cc: Jonathan Corbet <corbet@lwn.net>
      Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>
  10. 03 Jun, 2016 1 commit
  11. 01 Jun, 2016 2 commits
  12. 30 May, 2016 1 commit
    • Jani Nikula's avatar
      Documentation/sphinx: add Sphinx kernel-doc directive extension · c56de1db
      Jani Nikula authored
      Add an extension to handle kernel-doc directives, to call kernel-doc
      according to the arguments and parameters given to the reStructuredText
      The syntax for the kernel-doc directive is:
      .. kernel-doc:: FILENAME
         :functions: FUNCTION [FUNCTION ...]
         :doc: SECTION TITLE
      Of the directive options export, internal, functions, and doc, currently
      only one option may be given at a time.
      The FILENAME is relative from the kernel source tree root.
      The extension notifies Sphinx about the document dependency on FILENAME,
      causing the document to be rebuilt when the file has been changed.
      Signed-off-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>