- Dec 08, 2020
-
-
Ben Widawsky authored
Add missing ';' as well as fixes the indent for the first struct. Signed-off-by:
Ben Widawsky <ben.widawsky@intel.com> Link: https://lore.kernel.org/r/20201207210027.1049346-1-ben.widawsky@intel.com Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Oct 15, 2020
-
-
Mauro Carvalho Chehab authored
Currently, there's no way to exclude identifiers from a kernel-doc markup. Add support for it. Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- Sep 03, 2020
-
-
Nícolas F. R. A. Prado authored
Update text and examples in the "Cross-referencing from reStructuredText" section to reflect that no additional syntax is needed anymore. Signed-off-by:
Nícolas F. R. A. Prado <nfraprado@protonmail.com> Link: https://lore.kernel.org/r/20200903005747.3900333-3-nfraprado@protonmail.com Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Nov 07, 2019
-
-
Changbin Du authored
The 'functions' directive is not only for functions, but also works for structs/unions. So the name is misleading. This patch renames it to 'identifiers', which specific the functions/types to be included in documentation. We keep the old name as an alias of the new one before all documentation are updated. Signed-off-by:
Changbin Du <changbin.du@gmail.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jun 28, 2019
-
-
Sheriff Esseson authored
fix the disjunction by replacing "of" with "or". Signed-off-by:
Sheriff Esseson <sheriffesseson@gmail.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Feb 17, 2019
-
-
Frank Rowand authored
"If no *function* if specified" should instead be "If no *function* is specified". Reported-by:
Matthew Wilcox <willy@infradead.org> Signed-off-by:
Frank Rowand <frank.rowand@sony.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Feb 01, 2019
-
-
Frank Rowand authored
Fix a typo in kernel-doc.rst Signed-off-by:
Frank Rowand <frank.rowand@sony.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Frank Rowand authored
(1) The command to generate man pages is truncated in the pdf version of the document. Reformat the command into multiple lines to prevent the truncation. (2) Older versions of git do not support all variants of pathspec syntax. Provide commands to generate man pages for various alternate syntax. Signed-off-by:
Frank Rowand <frank.rowand@sony.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Nov 07, 2018
-
-
Joris Gutjahr authored
In the Function documentation Section of kernel-doc.rst there is a function_name() function as an example for how to make a comment about a function. But at the end of that example there is a reference to foobar instead of function_name. I think that should rather be function_name, because that was the placeholder the whole example was using. Signed-off-by:
Joris Gutjahr <joris.gutjahr@gmail.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jun 30, 2018
-
-
Mike Rapoport authored
When kernel-doc:: specified in .rst document without explicit directives, it outputs both comment and DOC: sections. If a DOC: section was explicitly included in the same document it will be duplicated. For example, the output generated for Documentation/core-api/idr.rst [1] has "IDA description" in the "IDA usage" section and in the middle of the API reference. This patch enables using "functions" directive without parameters to output all the documentation excluding DOC: sections. [1] https://www.kernel.org/doc/html/v4.17/core-api/idr.html Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Acked-by:
Matthew Wilcox <willy@infradead.org> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Feb 23, 2018
-
-
Mike Rapoport authored
Currently there is no automated checking for kernel-doc comments except running 'kernel-doc -v -none <filename>'. Mention the possibility to run kernel-doc to verify formatting of the comments in the kernel-doc guide. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Feb 18, 2018
-
-
Mauro Carvalho Chehab authored
It helps to give some examples about how to use in-line comments also when nested union/structs are present. So add it. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
We want to give some examples about how to do in-line comments for nested structs. So, move it to be after nested structs/unions chapter. The section content was not changed on this patch. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
Without ending with a ";", kernel-doc doesn't recognize it as an struct, and it fails to parse the example. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
There's a missing */ at the end of Kernel docs example. Even adding it, it will still produce 3 warnings: example:33: warning: Function parameter or member 'bar' not described in 'nested_foobar' example:33: warning: Function parameter or member 'bar.st1' not described in 'nested_foobar' example:33: warning: Function parameter or member 'bar.st2' not described in 'nested_foobar' So, make the example more complete and add the missing end of comment there. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Feb 13, 2018
-
-
Matthew Wilcox authored
I found the layout confusing with multiple introductions to what kernel-doc is and how to use it. I made the following changes: - Moved the 'Including kernel-doc comments' section to the end of the document -- we should explain what it *is* before we explain how to integrate it. - Moved the 'Recommendations' subsection to the top. We want people to know what to document before telling them how to do it. - Rewrite the 'Writing kernel-doc comments' section, integrating the 'Recommendations' subsection and a paragraph from 'How to format kernel-doc comments'. - Remove the paragraph about the kernel-doc script; we're supposed to be teaching people how to use punctuation to write pretty documentation, not documenting the build tooling. - Split the 'Parameters and member arguments' section into 'Function parameters' and 'Members'. Structure members are not commonly referred to as arguments. - Integrate the 'private:' and 'public:' tag descriptions into the 'Members' section. - Move the 'In-line member documentation comments' subsection up to be with the 'Members' section. Signed-off-by:
Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Matthew Wilcox authored
Line up the second line in the way that the example purports to be showing. Signed-off-by:
Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Matthew Wilcox authored
Instead of asking the user to copy and paste a small perl script from the documentation, just distribute the perl script in the scripts directory. Signed-off-by:
Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Matthew Wilcox authored
The author clearly meant to use the word 'which' here. Also replace some tabs with spaces which fixes the syntax highlighting in my editor. Signed-off-by:
Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Matthew Wilcox authored
This section is mentioned in scripts/kernel-doc, so we should mention it in doc-guide/kernel-doc.rst. There are close to 500 comments using the Context section already, and almost 300 using a Locking section which fulfills much the same purpose (and should probably be converted for consistency). Signed-off-by:
Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Dec 21, 2017
-
-
Mauro Carvalho Chehab authored
There are several places within the Kernel tree with nested structs/unions, like this one: struct ingenic_cgu_clk_info { const char *name; enum { CGU_CLK_NONE = 0, CGU_CLK_EXT = BIT(0), CGU_CLK_PLL = BIT(1), CGU_CLK_GATE = BIT(2), CGU_CLK_MUX = BIT(3), CGU_CLK_MUX_GLITCHFREE = BIT(4), CGU_CLK_DIV = BIT(5), CGU_CLK_FIXDIV = BIT(6), CGU_CLK_CUSTOM = BIT(7), } type; int parents[4]; union { struct ingenic_cgu_pll_info pll; struct { struct ingenic_cgu_gate_info gate; struct ingenic_cgu_mux_info mux; struct ingenic_cgu_div_info div; struct ingenic_cgu_fixdiv_info fixdiv; }; struct ingenic_cgu_custom_info custom; }; }; Currently, such struct is documented as: **Definition** :: struct ingenic_cgu_clk_info { const char * name; }; **Members** ``name`` name of the clock With is obvioulsy wrong. It also generates an error: drivers/clk/ingenic/cgu.h:169: warning: No description found for parameter 'enum' However, there's nothing wrong with this kernel-doc markup: everything is documented there. It makes sense to document all fields there. So, add a way for the core to parse those structs. With this patch, all documented fields will properly generate documentation. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
kernel-doc-nano-HOWTO.txt has a chapter about man pages production. While we don't have a working "make manpages" target, add it. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
Add documentation about typedefs for function prototypes and move it to happen earlier. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
There is a mess on this chapter: it suggests that even enums and unions should be documented with "struct". That's not the way it should be ;-) Fix it and move it to happen earlier. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
Move its contents to happen earlier and improve the description of return values, adding a subsection to it. Most of the contents there came from kernel-doc-nano-HOWTO.txt. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
The private members section can now be moved to be together with the arguments section. Move it there and add an example about the usage of public: Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Mauro Carvalho Chehab authored
Add a new section to describe kernel-doc arguments, adding examples about how identation should happen, as failing to do that causes Sphinx to do the wrong thing. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Oct 19, 2017
-
-
Tom Saeger authored
Signed-off-by:
Tom Saeger <tom.saeger@oracle.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- May 16, 2017
-
-
Mauro Carvalho Chehab authored
changeset b97f193a ("scripts/kernel-doc: fix parser for apostrophes") added support for ``literal`` inside kernel-doc, in order to allow using the "%" symbol inside a literal block, as this is used at printk() description. Document it. Fixes: b97f193a ("scripts/kernel-doc: fix parser for apostrophes") Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com>
-
- Nov 19, 2016
-
-
Mauro Carvalho Chehab authored
Having the kernel-documentation at the topmost level doesn't allow generating a separate PDF file for it. Also, makes harder to add extra contents. So, place it on a sub-dir. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
Daniel Vetter authored
We don't just need better doc toolchains, we also need better docs for our doc toolchain! v2: Make sure we don't have foo twice (Jani). Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: linux-doc@vger.kernel.org Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Oct 27, 2016
-
-
Jonathan Corbet authored
Let's make the title of this document (which shows up in the top page) better describe its contents. Cc: Jani Nikula <jani.nikula@intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Sep 21, 2016
-
-
Mauro Carvalho Chehab authored
Task 11 (kernel-doc) still mentions usage of make manpages, but this won't work if the API is documented via Sphinx. So, update it to use either htmldocs or pdfdocs, with are the documentation targets that work for all. While here, add ReST reference to the kernel documentation book. Signed-off-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Aug 22, 2016
-
-
Markus Heiser authored
Add option 'name' to the "c:function:" directive. With option 'name' the ref-name of a function can be modified. E.g.:: .. c:function:: int ioctl( int fd, int request ) :name: VIDIOC_LOG_STATUS The func-name (e.g. ioctl) remains in the output but the ref-name changed from ``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by:: :c:func:`VIDIOC_LOG_STATUS` Signed-off-by:
Markus Heiser <markus.heiser@darmarIT.de> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Aug 12, 2016
-
-
Jonathan Corbet authored
With the conf.py change, we don't need them to avoid warnings anymore. Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jul 18, 2016
-
-
Jonathan Corbet authored
Sphinx wants to interpret all literal blocks as being in the chosen language and complains when an attempt to parse a block fails. kernel-documentation.rst has a few blocks that are not in C; make that explicit to shut down the associated warnings. Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jun 30, 2016
-
-
Markus Heiser authored
Implements the reST flat-table directive. The ``flat-table`` is a double-stage list similar to the ``list-table`` with some additional features: * column-span: with the role ``cspan`` a cell can be extended through additional columns * row-span: with the role ``rspan`` a cell can be extended through additional rows * auto span rightmost cell of a table row over the missing cells on the right side of that table-row. With Option ``:fill-cells:`` this behavior can changed from *auto span* to *auto fill*, which automaticly inserts (empty) list tables The *list tables* formats are double stage lists. Compared to the ASCII-art they migth be less comfortable for readers of the text-files. Their advantage is, that they are easy to create/modify and that the diff of a modification is much more meaningfull, because it is limited to the modified content. The initial implementation was taken from the sphkerneldoc project [1] [1] https://github.com/return42/sphkerneldoc/commits/master/scripts/site-python/linuxdoc/rstFlatTable.py Signed-off-by:
Markus Heiser <markus.heiser@darmarIT.de> [jc: fixed typos and misspellings in the docs] Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Jun 24, 2016
-
-
Jani Nikula authored
Describe Sphinx, reStructuredText, the kernel-doc extension, the kernel-doc structured documentation comments, etc. The kernel-doc parts are based on kernel-doc-nano-HOWTO.txt, by Tim <twaugh@redhat.com>. Signed-off-by:
Jani Nikula <jani.nikula@intel.com> Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-