summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kernel-doc: unify all EXPORT_SYMBOL scanning to one placeJani Nikula2016-06-101-13/+5
| | | | | | | Scan all input files for EXPORT_SYMBOLs along with the explicitly specified export files before actually parsing anything. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* kernel-doc: add support for specifying extra files for EXPORT_SYMBOLsJani Nikula2016-06-101-2/+37
| | | | | | | | | | | | | | | | | | | If the kernel-doc comments for functions are not in the same file as the EXPORT_SYMBOL statements, the -export and -internal output selections do not work as expected. This is typically the case when the kernel-doc comments are in header files next to the function declarations and the EXPORT_SYMBOL statements are next to the function definitions in the source files. Let the user specify additional source files in which to look for the EXPORT_SYMBOLs using the new -export-file FILE option, which may be given multiple times. The pathological example for this is include/net/mac80211.h, which has all the kernel-doc documentation for the exported functions defined in a plethora of source files net/mac80211/*.c. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* kernel-doc: abstract filename mappingJani Nikula2016-06-101-9/+18
| | | | | | Reduce duplication in follow-up work. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* kernel-doc: add missing semi-colons in option parsingJani Nikula2016-06-101-2/+2
| | | | Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* kernel-doc: do not warn about duplicate default section namesJani Nikula2016-06-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Since commit 32217761ee9db0215350dfe1ca4e66f312fb8c54 Author: Jani Nikula <jani.nikula@intel.com> Date: Sun May 29 09:40:44 2016 +0300 kernel-doc: concatenate contents of colliding sections we started getting (more) errors on duplicate section names, especially on the default section name "Description": include/net/mac80211.h:3174: warning: duplicate section name 'Description' This is usually caused by a slightly unorthodox placement of parameter descriptions, like in the above case, and kernel-doc resetting back to the default section more than once within a kernel-doc comment. Ignore warnings on the duplicate section name automatically assigned by kernel-doc, and only consider explicitly user assigned duplicate section names an issue. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* kernel-doc: remove old debug cruft from dump_section()Jani Nikula2016-06-101-3/+0
| | | | | | No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* docs: kernel-doc: Add "example" and "note" to the magic section typesJonathan Corbet2016-06-091-1/+2
| | | | | | | | Lots of kerneldoc entries use "example:" or "note:" as section headers. Until such a time as we can make them use proper markup, make them work as intended. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* docs: self-protection: rename "leak" to "exposure"Kees Cook2016-06-091-10/+18
| | | | | | | | | | | The meaning of "leak" can be both "untracked resource allocation" and "memory content disclosure". This document's use was entirely of the latter meaning, so avoid the confusion by using the Common Weakness Enumeration name for this: Information Exposure (CWE-200). Additionally adds a section on structure randomization. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* Merge branch 'sphinx-for-docs-next' into doc/4.8Jonathan Corbet2016-06-0911-144/+948
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jani Nikula says: Jon, this is v2 of [1] and [2], with a considerable amount of polish and fixes added. We started dogfooding this within drm-intel, and Daniel has reviewed the lot and contributed a number of fixes, most notably accurate file and line number references from Sphinx build errors/warnings to the kernel-doc comments in source code. We believe this is now in good shape for merging for v4.8. It's all in my sphinx-for-docs-next branch that you've already looked at; pull details below. When this lands in docs-next and we can backmerge to drm, we'll plunge ahead and convert gpu.tmpl to rst, and have that ready for v4.8. We think it's best to contribute that via the drm tree, as it'll involve splitting up the documentation and likely numerous updates to kernel-doc comments. I plan to update Documentation/kernel-doc-nano-HOWTO.txt for Sphinx and rst, obviously converting it to rst while at it.
| * doc/sphinx: Track line-number of starting blocksDaniel Vetter2016-06-041-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. v3: - 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 <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * scripts/kernel-doc: Add option to inject line numbersDaniel Vetter2016-06-041-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opt-in since this wreaks the rst output and must be removed by consumers again. This is useful to adjust the linenumbers for included kernel-doc snippets in shinx. With that sphinx error message will be accurate when there's issues with the rst-ness of the kernel-doc comments. Especially when transitioning a new docbook .tmpl to .rst this is extremely useful, since you can just use your editors compilation quickfix list to accurately jump from error to error. v2: - Also make sure that we filter the LINENO for purpose/at declaration start so it only shows for selected blocks, not all of them (Jani). While at it make it a notch more accurate. - Avoid undefined $lineno issues. I tried filtering these out at the callsite, but Jani spotted more when linting the entire kernel. Unamed unions and similar things aren't stored consistently and end up with an undefined line number (but also no kernel-doc text, just the parameter type). Simplify things and filter undefined line numbers in print_lineno() to catch them all. v3: Fix LINENO 0 issue for kernel-doc comments without @param: lines or any other special sections that directly jump to the description after the "name - purpose" line. Only really possible for functions without parameters. Noticed 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 <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * scripts/kernel-doc: Also give functions symbolic namesDaniel Vetter2016-06-031-4/+4
| | | | | | | | | | | | | | | | | | | | state3 = prototype parsing, so name them accordingly. Cc: Jani Nikula <jani.nikula@intel.com> Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * doc/sphinx: Stop touching state_machine internalsDaniel Vetter2016-06-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of just forcefully inserting our kernel-doc input and letting the state machine stumble over it the recommended way is to create ViewList, parse that and then return the list of parsed nodes. 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 <daniel.vetter@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * scripts/kernel-doc: Remove duplicated DOC: start handlingDaniel Vetter2016-06-031-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Further up in the state machinery we switch from STATE_NAME to STATE_DOCBLOCK when we match /$doc_block/. Which means this block of code here is entirely unreachable, unless there are multiple DOC: sections within a single kernel-doc comment. Getting a list of all the files with more than one DOC: section using $ git grep -c " * DOC:" | grep -v ":1$" and then doing a full audit of them reveals there are no such comment blocks in the kernel. Supporting multiple DOC: sections in a single kernel-doc comment does not seem like a recommended way of doing things anyway, so nuke the code for simplicity. Cc: Jani Nikula <jani.nikula@intel.com> Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> [Jani: amended the commit message] Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * doc/sphinx: Pass right filename as sourceDaniel Vetter2016-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this error output becomes almost readable. The line numbers are still totally bonghits, but that's a lot harder to pull out of kerneldoc. We'd essentially have to insert some special markers in the kernel-doc output, split the output along these markers and then insert each block separately using state_machine.insert_input(block, source, first_line) Cc: Jani Nikula <jani.nikula@intel.com> Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: fix kernel-doc extension on python3Jani Nikula2016-06-011-2/+7
| | | | | | | | | | | | | | | | | | | | Reconcile differences between python2 and python3 on dealing with stdout, stderr from Popen. This fixes "name 'unicode' is not defined" errors on python3. We'll need to try to keep the extension working on both python-sphinx and python3-sphinx so we don't need two copies. Reported-and-tested-by: Marius Vlad <marius.c.vlad@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: reset contents and section harderJani Nikula2016-05-301-0/+3
| | | | | | | | | | | | | | If the documentation comment does not have params or sections, the section heading may leak from the previous documentation comment. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: concatenate contents of colliding sectionsJani Nikula2016-05-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are multiple sections with the same section name, the current implementation results in several sections by the same heading, with the content duplicated from the last section to all. Even if there's the error message, a more graceful approach is to combine all the identically named sections into one, with concatenated contents. With the supported sections already limited to select few, there are massively fewer collisions than there used to be, but this is still useful for e.g. when function parameters are documented in the middle of a documentation comment, with description spread out above and below. (This is not a recommended documentation style, but used in the kernel nonetheless.) We can now also demote the error to a warning. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: limit the "section header:" detection to a select fewJani Nikula2016-05-301-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel-doc currently identifies anything matching "section header:" (specifically a string of word characters and spaces followed by a colon) as a new section in the documentation comment, and renders the section header accordingly. Unfortunately, this turns all uses of colon into sections, mostly unintentionally. Considering the output, erroneously creating sections when not intended is always worse than erroneously not creating sections when intended. For example, a line with "http://example.com" turns into a "http" heading followed by "//example.com" in normal text style, which is quite ugly. OTOH, "WARNING: Beware of the Leopard" is just fine even if "WARNING" does not turn into a heading. It is virtually impossible to change all the kernel-doc comments, either way. The compromise is to pick the most commonly used and depended on section headers (with variants) and accept them as section headers. The accepted section headers are, case insensitive: * description: * context: * return: * returns: Additionally, case sensitive: * @return: All of the above are commonly used in the kernel-doc comments, and will result in worse output if not identified as section headers. Also, kernel-doc already has some special handling for all of them, so there's nothing particularly controversial in adding more special treatment for them. While at it, improve the whitespace handling surrounding section names. Do not consider the whitespace as part of the name. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: remove fixme commentJani Nikula2016-05-301-1/+0
| | | | | | | | | | | | Yes, for our purposes the type should contain typedef. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: use *undescribed* instead of _undescribed_Jani Nikula2016-05-301-2/+2
| | | | | | | | | | | | The latter isn't special to rst. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: strip leading whitespace from continued param descsJani Nikula2016-05-301-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | If a param description spans multiple lines, check any leading whitespace in the first continuation line, and remove same amount of whitespace from following lines. This allows indentation in the multi-line parameter descriptions for aesthetical reasons while not causing accidentally significant indentation in the rst output. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: improve handling of whitespace on the first line param descriptionJani Nikula2016-05-301-4/+4
| | | | | | | | | | | | | | | | | | Handle whitespace on the first line of param text as if it was the empty string. There is no need to add the newline in this case. This improves the rst output in particular, where blank lines may be problematic in parameter lists. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: change the output layoutJani Nikula2016-05-301-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from field lists, and simply use **strong emphasis** for section headings on lines of their own. Do not use rst section headings, because their nesting depth depends on the surrounding context, which kernel-doc has no knowledge of. Also, they do not need to end up in any table of contexts or indexes. There are two related immediate benefits. Field lists are typically rendered in two columns, while the new style uses the horizontal width better. With no extra indent on the left, there's no need to be as fussy about it. Field lists are more susceptible to indentation problems than the new style. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: strip leading blank lines from inline doc commentsJani Nikula2016-05-301-0/+4
| | | | | | | | | | | | | | | | The inline member markup allows whitespace lines before the actual documentation starts. Strip the leading blank lines. This improves the rst output. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: blank lines in output are not neededJani Nikula2016-05-301-6/+1
| | | | | | | | | | | | Current approach leads to two blank lines, while one is enough. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: fix wrong code indentationJani Nikula2016-05-301-1/+1
| | | | | | | | | | | | No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: do not regard $, %, or & prefixes as special in section namesJani Nikula2016-05-301-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | The use of these is confusing in the script, and per this grep, they're not used anywhere anyway: $ git grep " \* [%$&][a-zA-Z0-9_]*:" -- *.[ch] | grep -v "\$\(Id\|Revision\|Date\)" While at it, throw out the constants array, nothing is ever put there again. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: highlight function/struct/enum purpose lines tooJani Nikula2016-05-301-12/+25
| | | | | | | | | | | | | | Let the user use @foo, &bar, %baz, etc. in the first kernel-doc purpose line too. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: drop redundant unescape in highlightingJani Nikula2016-05-301-1/+0
| | | | | | | | | | | | This bit is already done by xml_unescape() above. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: add support for struct/union/enum member referencesJani Nikula2016-05-301-0/+5
| | | | | | | | | | | | | | | | | | Link "&foo->bar", "&foo->bar()", "&foo.bar", and "&foo.bar()" to the struct/union/enum foo definition. The members themselves do not currently have anchors to link to, but this is better than nothing, and promotes a universal notation. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: add support for &union foo and &typedef foo referencesJani Nikula2016-05-301-0/+4
| | | | | | | | | | | | | | | | | | Let the user use "&union foo" and "&typedef foo" to reference foo. The difference to using "union &foo", "typedef &foo", or just "&foo" (which are valid too) is that "union" and "typedef" become part of the link text. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: &foo references are more universal than structsJani Nikula2016-05-301-1/+2
| | | | | | | | | | | | | | It's possible to use &foo to reference structs, enums, typedefs, etc. in the Sphinx C domain. Thus do not prefix the links with "struct". Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: reference functions according to C domain specJani Nikula2016-05-301-1/+1
| | | | | | | | | | | | | | The Sphinx C domain spec says function references should include the parens (). Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: do not output DOC: section titles for requested onesJani Nikula2016-05-301-1/+3
| | | | | | | | | | | | | | | | | | If the user requests a specific DOC: section by name, do not output its section title. In these cases, the surrounding context already has a heading, and the DOC: section title is only used as an identifier and a heading for clarity in the source file. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: add names for output selectionJani Nikula2016-05-301-17/+30
| | | | | | | | | | | | | | | | | | | | Make the output selection a bit more readable by adding constants for the various types of output selection. While at it, actually call the variable for choosing what to output $output_selection. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: add names for states and substatesJani Nikula2016-05-301-43/+48
| | | | | | | | | | | | | | | | | | | | Make the state machine a bit more readable by adding constants for parser states and inline member documentation parser substates. While at it, rename the "split" documentation to "inline" documentation. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: nicer referencing of struct in docbook->rst conversionJani Nikula2016-05-302-6/+14
| | | | | | | | | | | | Add "struct" in the label of the reference. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * sphinx: update docbook->rst conversion script match C domain specJani Nikula2016-05-301-4/+4
| | | | | | | | | | | | | | Function references should include the parens (), struct references should not include "struct". Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * sphinx: cheesy script to convert .tmpl filesJonathan Corbet2016-05-303-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | This script uses pandoc to convert existing DocBook template files to RST templates. A couple of sed scripts are need to massage things both before and after the conversion, but the result is then usable with no hand editing. [Jani: Change usage to tmplcvt <in> <out>. Fix escaping for docproc directives. Add support the new kernel-doc extension.] Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: set version and release properlyJani Nikula2016-05-302-5/+26
| | | | | | | | | | | | | | | | Read the version and release from the top level Makefile (for use when Sphinx is invoked directly, by e.g. Read the Docs), but override them via Sphinx command line arguments in a normal documentation build. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: configure the kernel-doc extensionJani Nikula2016-05-302-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tell Sphinx where to find the extension, and pass on the kernel src tree and kernel-doc paths to the extension. With this, any .rst files under Documentation may contain the kernel-doc rst directive to include kernel-doc documentation from any source file. While building, it may be handy to pass kernel-doc extension configuration on the command line. For example, 'make SPHINXOPTS="-D kerneldoc_verbosity=0" htmldocs' silences all stderr output from kernel-doc when the kernel-doc exit code is 0. (The stderr will be logged unconditionally when the exit code is non-zero.) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: add Sphinx kernel-doc directive extensionJani Nikula2016-05-301-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an extension to handle kernel-doc directives, to call kernel-doc according to the arguments and parameters given to the reStructuredText directive. The syntax for the kernel-doc directive is: .. kernel-doc:: FILENAME :export: :internal: :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 <jani.nikula@intel.com>
| * Documentation: add .gitignoreJani Nikula2016-05-301-0/+1
| | | | | | | | | | | | The Sphinx output directory is generated. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * Documentation/sphinx: add basic working Sphinx configuration and buildJani Nikula2016-05-305-5/+478
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic configuration and makefile to build documentation from any .rst files under Documentation using Sphinx. For starters, there's just the placeholder index.rst. At the top level Makefile, hook Sphinx documentation targets alongside (but independent of) the DocBook toolchain, having both be run on the various 'make *docs' targets. All Sphinx processing is placed into Documentation/Makefile.sphinx. Both that and the Documentation/DocBook/Makefile are now expected to handle all the documentation targets, explicitly ignoring them if they're not relevant for that particular toolchain. The changes to the existing DocBook Makefile are kept minimal. There is graceful handling of missing Sphinx and rst2pdf (which is needed for pdf output) by checking for the tool and python module, respectively, with informative messages to the user. If the Read the Docs theme (sphinx_rtd_theme) is available, use it, but otherwise gracefully fall back to the Sphinx default theme, with an informative message to the user, and slightly less pretty HTML output. Sphinx can now handle htmldocs, pdfdocs (if rst2pdf is available), epubdocs and xmldocs targets. The output documents are written into per output type subdirectories under Documentation/output. Finally, you can pass options to sphinx-build using the SPHINXBUILD make variable. For example, 'make SPHINXOPTS=-v htmldocs' for more verbose output from Sphinx. This is based on the original work by Jonathan Corbet, but he probably wouldn't recognize this as his own anymore. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc: support printing exported and non-exported symbolsJani Nikula2016-05-301-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use docproc to figure out which symbols are exported, and then docproc calls kernel-doc on specific functions, to get documentation on exported functions. According to git blame and docproc comments, this is due to historical reasons, as functions and their corresponding EXPORT_SYMBOL* may have been in different files. However for more than ten years the recommendation in CodingStyle has been to place the EXPORT_SYMBOL* immediately after the closing function brace line. Additionally, the kernel-doc comments for functions are generally placed above the function definition in the .c files (i.e. where the EXPORT_SYMBOL* is) rather than above the declaration in the .h files. There are some exceptions to this, but AFAICT none of these are included in DocBook documentation using the "!E" docproc directive. Therefore, assuming the EXPORT_SYMBOL* and kernel-doc are with the function definition, kernel-doc can extract the exported vs. not information by making two passes on the input file. Add support for that via the new -export and -internal parameters. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
| * kernel-doc/rst: fix use of uninitialized valueJani Nikula2016-05-301-1/+2
| | | | | | | | | | | | | | | | | | | | I'm not quite sure why the errors below are happening, but this fixes them. Use of uninitialized value in string ne at ./scripts/kernel-doc line 1819, <IN> line 6494. Use of uninitialized value $_[0] in join or string at ./scripts/kernel-doc line 1759, <IN> line 6494. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
* | Documentation: dmaengine: fix typo for device_resumeNiklas Söderlund2016-06-031-1/+1
| | | | | | | | | | Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | Documentation/zh_CN: update Chinese version CodingStyleAndy Deng2016-06-031-231/+350
| | | | | | | | | | | | | | | | | | | | Chinese version CodingStyle is a little outdate, it should be updated. This patch sync with the latest CodingStyle of all changes, new chapters (chapter 19 and chapter 20) have been translated. Signed-off-by: Andy Deng <theandy.deng@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
* | doc: clarify that trace_events= takes a comma-separated listBrian Norris2016-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | It took me browsing through the source code to determine that I was, indeed, using the wrong delimiter in my command lines. So I might as well document it for the next person. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>