aboutsummaryrefslogtreecommitdiff
path: root/Documentation/doc-guide
AgeCommit message (Collapse)AuthorFilesLines
2022-05-09Documentation/process: use scripts/get_maintainer.pl on patchesGravatar Krzysztof Kozlowski 1-2/+3
Explain that, when collecting list of people to Cc the patch, scripts/get_maintainer.pl should be used on patches, not on the directories. The behavior is quite different, because with "-f" on a directory, the maintainers of individual files will not be shown. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220427185645.677039-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-04-05Documentation: sphinx: replace "Introduction" chapter heading with page titleGravatar Bagas Sanjaya 1-2/+3
Replace first chapter heading ("Introduction") with page title named "Using Sphinx for kernel documentation". This way, the first-level TOC for doc-guide contains title instead of chapter headings for this page. Cc: Jonathan Corbet <corbet@lwn.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Tony Nguyen <anthony.l.nguyen@intel.com> Cc: Vinod Koul <vkoul@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Cc: Akira Yokosawa <akiyks@gmail.com> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-kernel@vger.kernel.org Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-04-05Documentation: kernel-doc: Promote two chapter headings to page titleGravatar Bagas Sanjaya 1-0/+2
Promote "Writing kernel-doc comments" heading to page title, in accordance to kernel documentation guidelines. Also promote "Including kernel-doc comments" heading because both headings deserve their own chapters in PDF output. There is no differences in the resulting output except formatting semantics. Cc: Jonathan Corbet <corbet@lwn.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Tony Nguyen <anthony.l.nguyen@intel.com> Cc: Vinod Koul <vkoul@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Cc: Akira Yokosawa <akiyks@gmail.com> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-kernel@vger.kernel.org Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-01-07docs: discourage use of list tablesGravatar Jonathan Corbet 1-6/+5
Our documentation encourages the use of list-table formats, but that advice runs counter to the objective of keeping the plain-text documentation as useful and readable as possible. Turn that advice around the other way so that people don't keep adding these tables. Acked-by: Christoph Hellwig <hch@lst.de> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-12-16docs: address some text issues with css/theme supportGravatar Mauro Carvalho Chehab 1-1/+1
Fix: - overriden ->overridden - some whitespace issues introduced at the css/theme Makefile help. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/b0b166025019f7cc4f122bd789c79ba28cc2d29d.1639212812.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-12-10docs: allow to pass extra DOCS_CSS themes via makeGravatar Mauro Carvalho Chehab 1-0/+3
Specially when the RTD theme is not used, it makes sense to allow specifying extra CSS files via a make variable. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/03d09bf41ad39aa0abfe2ea3c879b09aa3a0948d.1638870323.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-12-10docs: allow selecting a Sphinx themeGravatar Mauro Carvalho Chehab 1-0/+8
Instead of having RTD as an almost mandatory theme, allow the user to select other themes via DOCS_THEME environment var. There's a catch, though: as the current theme override logic is dependent of the RTD theme, we need to move the code which adds the CSS overrides to be inside the RTD theme logic. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/bd20adabfd428fd3cd0e69c2cf146aa354932936.1638870323.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-11-15docs: Update Sphinx requirementsGravatar Akira Yokosawa 1-13/+9
Commit f546ff0c0c07 ("Move our minimum Sphinx version to 1.7") raised the minimum version to 1.7. For pdfdocs, sphinx_pre_install says: note: If you want pdf, you need at least Sphinx 2.4.4. , and current requirements.txt installs Sphinx 2.4.4. Update Sphinx versions mentioned in docs and remove a note on earlier Sphinx versions. Update zh_CN and it_IT translations as well. Signed-off-by: Akira Yokosawa <akiyks@gmail.com> Cc: Federico Vaga <federico.vaga@vaga.pv.it> Cc: Alex Shi <alexs@kernel.org> Reviewed-by: Alex Shi <alexs@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-06-17docs: doc-guide: avoid using ReST :doc:`foo` markupGravatar Mauro Carvalho Chehab 1-4/+4
The :doc:`foo` tag is auto-generated via automarkup.py. So, use the filename at the sources, instead of :doc:`foo`. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d6cbe5183406e3378ed4bd0f84f4bcf85a15009c.1623824363.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-02-04docs: Document cross-referencing using relative pathGravatar Nícolas F. R. A. Prado 1-10/+20
Update the Cross-referencing section to explain how to create a cross-reference to a document using relative paths and with no additional syntax, by relying on automarkup.py. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com> Link: https://lore.kernel.org/r/20210128010028.58541-3-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-12-31Documentation: doc-guide: fixes to sphinx.rstGravatar Randy Dunlap 1-16/+16
Various fixes to sphinx.rst: - eliminate a double-space between 2 words - grammar/wording - punctuation - call rows in a table 'rows' instead of 'columns' (or does Sphinx call everything a column?) - It seems that "amdfonts" should be "amsfonts". I can't find any amdfonts. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/20201228231212.22448-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-12-08kernel-doc: Fix example in Nested structs/unionsGravatar Ben Widawsky 1-3/+3
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>
2020-12-03Documentation: fix typos found in process, dev-tools, and doc-guide ↵Gravatar Andrew Klychkov 1-1/+1
subdirectories Fix four typos in kcov.rst, sphinx.rst, clang-format.rst, and embargoed-hardware-issues.rst Signed-off-by: Andrew Klychkov <andrew.a.klychkov@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20201202075438.GA35516@spblnx124.lan Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-10-15docs: kerneldoc.py: add support for kerneldoc -nosymbolGravatar Mauro Carvalho Chehab 1-0/+8
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>
2020-09-16docs: Document cross-referencing between documentation pagesGravatar Nícolas F. R. A. Prado 1-0/+17
The syntax to cross-reference between documentation pages wasn't documented anywhere. Document the cross-referencing using the new automarkup for Documentation/... and also Sphinx's doc directive for using relative paths. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com> Link: https://lore.kernel.org/r/20200911133339.327721-4-nfraprado@protonmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-09-03kernel-doc: Update "cross-referencing from rST" section to use automarkupGravatar Nícolas F. R. A. Prado 1-16/+17
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>
2020-06-10Merge tag 'docs-5.8-2' of git://git.lwn.net/linuxGravatar Linus Torvalds 1-1/+1
Pull more documentation updates from Jonathan Corbet: "A handful of late-arriving docs fixes, along with a patch changing a lot of HTTP links to HTTPS that had to be yanked and redone before the first pull" * tag 'docs-5.8-2' of git://git.lwn.net/linux: docs/memory-barriers.txt/kokr: smp_mb__{before,after}_atomic(): update Documentation Documentation: devres: add missing entry for devm_platform_get_and_ioremap_resource() Replace HTTP links with HTTPS ones: documentation docs: it_IT: address invalid reference warnings doc: zh_CN: use doc reference to resolve undefined label warning docs: Update the location of the LF NDA program docs: dev-tools: coccinelle: underlines
2020-06-08Replace HTTP links with HTTPS ones: documentationGravatar Alexander A. Klimov 1-1/+1
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Link: https://lore.kernel.org/r/20200526060544.25127-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-06-03Merge tag 'media/v5.8-1' of ↵Gravatar Linus Torvalds 1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Media documentation is now split into admin-guide, driver-api and userspace-api books (a longstanding request from Jon); - The media Kconfig was reorganized, in order to make easier to select drivers and their dependencies; - The testing drivers now has a separate directory; - added a new driver for Rockchip Video Decoder IP; - The atomisp staging driver was resurrected. It is meant to work with 4 generations of cameras on Atom-based laptops, tablets and cell phones. So, it seems worth investing time to cleanup this driver and making it in good shape. - Added some V4L2 core ancillary routines to help with h264 codecs; - Added an ov2740 image sensor driver; - The si2157 gained support for Analog TV, which, in turn, added support for some cx231xx and cx23885 boards to also support analog standards; - Added some V4L2 controls (V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION) to help identifying where the camera is located at the device; - VIDIOC_ENUM_FMT was extended to support MC-centric devices; - Lots of drivers improvements and cleanups. * tag 'media/v5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (503 commits) media: Documentation: media: Refer to mbus format documentation from CSI-2 docs media: s5k5baf: Replace zero-length array with flexible-array media: i2c: imx219: Drop <linux/clk-provider.h> and <linux/clkdev.h> media: i2c: Add ov2740 image sensor driver media: ov8856: Implement sensor module revision identification media: ov8856: Add devicetree support media: dt-bindings: ov8856: Document YAML bindings media: dvb-usb: Add Cinergy S2 PCIe Dual Port support media: dvbdev: Fix tuner->demod media controller link media: dt-bindings: phy: phy-rockchip-dphy-rx0: move rockchip dphy rx0 bindings out of staging media: staging: dt-bindings: phy-rockchip-dphy-rx0: remove non-used reg property media: atomisp: unify the version for isp2401 a0 and b0 versions media: atomisp: update TODO with the current data media: atomisp: adjust some code at sh_css that could be broken media: atomisp: don't produce errs for ignored IRQs media: atomisp: print IRQ when debugging media: atomisp: isp_mmu: don't use kmem_cache media: atomisp: add a notice about possible leak resources media: atomisp: disable the dynamic and reserved pools media: atomisp: turn on camera before setting it ...
2020-04-20docs: fix broken references for ReST files that moved aroundGravatar Mauro Carvalho Chehab 1-1/+1
Some broken references happened due to shifting files around and ReST renames. Those can't be auto-fixed by the script, so let's fix them manually. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com> Link: https://lore.kernel.org/r/64773a12b4410aaf3e3be89e3ec7e34de2484eea.1586881715.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-04-14media: docs: move uAPI book to userspace-api/mediaGravatar Mauro Carvalho Chehab 1-1/+1
Since 2017, there is an space reserved for userspace API, created by changeset 1d596dee3862 ("docs: Create a user-space API guide"). As the media subsystem was one of the first subsystems to use Sphinx, until this patch, we were keeping things on a separate place. Let's just use the new location, as having all uAPI altogether will likely make things easier for developers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-02-05Documentation: build warnings related to missing blank lines after explicit ↵Gravatar Sameer Rahmani 2-0/+2
markups has been fixed Fix for several documentation build warnings related to missing blank lines after explicit mark up. Exact warning message: WARNING: Explicit markup ends without a blank line; unexpected unindent. Signed-off-by: Sameer Rahmani <lxsameer@gnu.org> Link: https://lore.kernel.org/r/20200203201543.24834-1-lxsameer@gnu.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-01-24Add a maintainer entry profile for documentationGravatar Jonathan Corbet 2-0/+45
Documentation should lead by example, so here's a basic maintainer entry profile for this subsystem. Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-01-24Add a document on how to contribute to the documentationGravatar Jonathan Corbet 2-0/+295
This is mostly a collection of thoughts for how people who want to help out can make the docs better. Hopefully the world will respond with a flurry of useful patches. Acked-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-11-07kernel-doc: rename the kernel-doc directive 'functions' to 'identifiers'Gravatar Changbin Du 1-13/+16
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>
2019-07-17docs: remove extra conf.py filesGravatar Mauro Carvalho Chehab 1-10/+0
Now that the latex_documents are handled automatically, we can remove those extra conf.py files. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-28Doc : doc-guide : Fix a typoGravatar Sheriff Esseson 1-1/+1
fix the disjunction by replacing "of" with "or". Signed-off-by: Sheriff Esseson <sheriffesseson@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-06-26docs: Note that :c:func: should no longer be usedGravatar Jonathan Corbet 1-5/+8
Now that we can mark up function() automatically, there is no reason to use :c:func: and every reason to avoid it. Adjust the documentation to reflect that fact. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-06-14sphinx.rst: Add note about code snippets embedded in the textGravatar André Almeida 1-1/+1
There's a paragraph that explains how to create fixed width text block, but it doesn't explains how to create fixed width text inline, although this feature is really used through the documentation. Fix that adding a quick note about it. Signed-off-by: André Almeida <andrealmeid@collabora.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-05-30docs: requirements.txt: recommend Sphinx 1.7.9Gravatar Mauro Carvalho Chehab 1-9/+8
As discussed at the linux-doc ML, while we'll still support version 1.3, it is time to recommend a more modern version. So, let's switch the minimal requirements to Sphinx 1.7.9, as it has the "-jauto" flag, with makes a lot faster when building documentation. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-04-19docs: doc-guide: remove the extension from .rst filesGravatar Mauro Carvalho Chehab 1-3/+3
On almost all places, we're including ReST files without the extension. Let's remove the extension here as well, in order to use just one standard. Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-02-17docs: kernel-doc: typo "if ... if" -> "if ... is"Gravatar Frank Rowand 1-1/+1
"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>
2019-02-01docs: kernel-doc: typo "documentaion"Gravatar Frank Rowand 1-1/+1
Fix a typo in kernel-doc.rst Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-02-01docs: kernel-doc: update commands to generate man pageGravatar Frank Rowand 1-1/+14
(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>
2019-01-14docs-rst: doc-guide: Minor grammar fixesGravatar Joel Nider 1-6/+6
While using this guide to learn the new documentation method, I saw a few phrases that I felt could be improved. These small changes improve the grammar and choice of words to further enhance the installation instructions. Signed-off-by: Joel Nider <joeln@il.ibm.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-12-06doc:process: add links where missingGravatar Federico Vaga 1-0/+2
Some documents are refering to others without links. With this patch I add those missing links. This patch affects only documents under process/ and labels where necessary. Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-11-07doc-guide:kernel-doc.rst: Reference to foobarGravatar Joris Gutjahr 1-1/+1
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>
2018-06-30Documentation/sphinx: allow "functions" with no parametersGravatar Mike Rapoport 1-2/+7
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>
2018-06-26doc:sphinx: fix parse-header descriptionGravatar Federico Vaga 1-1/+1
The description speaks about the option ``--man`` but it does not exist. Instead, there is the option ``--usage`` $ ./Documentation/sphinx/parse-headers.pl --man Unknown option: man Usage: parse_headers.pl [<options>] <C_FILE> <OUT_FILE> [<EXCEPTIONS_FILE>] Where <options> can be: --debug, --help or --man. Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-06-26doc:doc-guide: fix a typo and an errorGravatar Federico Vaga 2-2/+2
Fix a typo in sphinx.rst and a minor error in parse-header.rst Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-05-04MAINTAINERS & files: Canonize the e-mails I use at filesGravatar Mauro Carvalho Chehab 1-2/+2
From now on, I'll start using my @kernel.org as my development e-mail. As such, let's remove the entries that point to the old mchehab@s-opensource.com at MAINTAINERS file. For the files written with a copyright with mchehab@s-opensource, let's keep Samsung on their names, using mchehab+samsung@kernel.org, in order to keep pointing to my employer, with sponsors the work. For the files written before I join Samsung (on July, 4 2013), let's just use mchehab@kernel.org. For bug reports, we can simply point to just kernel.org, as this will reach my mchehab+samsung inbox anyway. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Brian Warner <brian.warner@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-02-23doc-guide: kernel-doc: add comment about formatting verificationGravatar Mike Rapoport 1-0/+11
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>
2018-02-18doc-guide: kernel-doc: add examples about nested union/structsGravatar Mauro Carvalho Chehab 1-2/+11
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>
2018-02-18doc-guide: kernel-doc: move in-line section to be after nested structGravatar Mauro Carvalho Chehab 1-28/+28
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>
2018-02-18doc-guide: kernel-doc: fix example for inlined commentsGravatar Mauro Carvalho Chehab 1-1/+1
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>
2018-02-18doc-guide: kernel-doc: fix example for nested_foobar structGravatar Mauro Carvalho Chehab 1-0/+4
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>
2018-02-13Restructure kernel-doc.rstGravatar Matthew Wilcox 1-259/+217
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>
2018-02-13Fix whitespace in exampleGravatar Matthew Wilcox 1-1/+1
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>
2018-02-13Add scripts/split-man.plGravatar Matthew Wilcox 1-28/+2
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>
2018-02-13Minor fixes to kernel-doc.rstGravatar Matthew Wilcox 1-8/+8
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>