Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc-guide: kernel-doc: specify that W=n does not check header files

The documentation states that:

make W=n

can be used to verify the documentation format. This is true for .c
files but not for headers [1].

Modify the documentation to specify that headers files are not covered
by make W=n and that these need to be checked separately with
scripts/kernel-doc.

[1] commit 3a025e1d1c2e ("Add optional check for bad kernel-doc comments")
Link: https://git.kernel.org/torvalds/c/3a025e1d1c2e

Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251225-doc-format-check-v1-1-dff637a4d275@kernel.org>

authored by

Vincent Mailhol and committed by
Jonathan Corbet
90f1d896 5ce70894

+5 -2
+5 -2
Documentation/doc-guide/kernel-doc.rst
··· 56 56 57 57 scripts/kernel-doc -v -none drivers/foo/bar.c 58 58 59 - The documentation format is verified by the kernel build when it is 60 - requested to perform extra gcc checks:: 59 + The documentation format of ``.c`` files is also verified by the kernel build 60 + when it is requested to perform extra gcc checks:: 61 61 62 62 make W=n 63 + 64 + However, the above command does not verify header files. These should be checked 65 + separately using ``kernel-doc``. 63 66 64 67 Function documentation 65 68 ----------------------