linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc-guide: kernel-doc: add comment about formatting verification
@ 2018-02-20 18:36 Mike Rapoport
  2018-02-23 15:06 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2018-02-20 18:36 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Matthew Wilcox, linux-doc, linux-kernel, Mike Rapoport

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>
---
v2:
* fix typo
* add a sentence about using 'make W=n'

 Documentation/doc-guide/kernel-doc.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index c6c3297..80383b1 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -44,6 +44,17 @@ that somebody changing the code will also change the documentation. The
 overview kernel-doc comments may be placed anywhere at the top indentation
 level.
 
+Running the ``kernel-doc`` tool with increased verbosity and without actual
+output generation may be used to verify proper formatting of the
+documentation comments. For example::
+
+	scripts/kernel-doc -v -none drivers/foo/bar.c
+
+The documentation format is verified by the kernel build when it is
+requested to perform extra gcc checks::
+
+	make W=n
+
 Function documentation
 ----------------------
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] doc-guide: kernel-doc: add comment about formatting verification
  2018-02-20 18:36 [PATCH] doc-guide: kernel-doc: add comment about formatting verification Mike Rapoport
@ 2018-02-23 15:06 ` Jonathan Corbet
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2018-02-23 15:06 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Matthew Wilcox, linux-doc, linux-kernel

On Tue, 20 Feb 2018 20:36:25 +0200
Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> 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>

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] doc-guide: kernel-doc: add comment about formatting verification
  2018-02-20 14:54 Mike Rapoport
@ 2018-02-20 15:03 ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2018-02-20 15:03 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Jonathan Corbet, linux-doc, linux-kernel

On Tue, Feb 20, 2018 at 04:54:44PM +0200, Mike Rapoport wrote:
>  level.
>  
> +Running the ``kernel-doc`` tool with increased verbosity and without actual
> +output generation may be used to verify proper formating of the

"formatting"

> +documentation comments. For example::
> +
> +	scripts/kernel-doc -v -none drivers/foo/bar.c
> +
>  Function documentation
>  ----------------------

And that's not exactly true.  "make W=1" will run that exact command.
For example:

$ make W=1 net/ipv4/
(...)
  CC      net/ipv4/tcp_input.o
net/ipv4/tcp_input.c:4279: warning: Excess function parameter 'dest' description in 'tcp_try_coalesce'
  CC      net/ipv4/tcp_output.o
net/ipv4/tcp_output.c:3177: warning: Function parameter or member 'sk' not described in 'tcp_make_synack'
(...)

perhaps sneak that information in there somewhere.

Also it'll prompt people to run with W=1, so perhaps they'll fix their
more-easily-fixed warnings ;-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] doc-guide: kernel-doc: add comment about formatting verification
@ 2018-02-20 14:54 Mike Rapoport
  2018-02-20 15:03 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2018-02-20 14:54 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Mike Rapoport

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>
---
 Documentation/doc-guide/kernel-doc.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index c6c3297..bb5ed6d 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -44,6 +44,12 @@ that somebody changing the code will also change the documentation. The
 overview kernel-doc comments may be placed anywhere at the top indentation
 level.
 
+Running the ``kernel-doc`` tool with increased verbosity and without actual
+output generation may be used to verify proper formating of the
+documentation comments. For example::
+
+	scripts/kernel-doc -v -none drivers/foo/bar.c
+
 Function documentation
 ----------------------
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-23 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-20 18:36 [PATCH] doc-guide: kernel-doc: add comment about formatting verification Mike Rapoport
2018-02-23 15:06 ` Jonathan Corbet
  -- strict thread matches above, loose matches on Subject: below --
2018-02-20 14:54 Mike Rapoport
2018-02-20 15:03 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).