linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Stephen Kitt <steve@sk2.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/8] docs: add a script to check sysctl docs
Date: Wed, 19 Feb 2020 03:44:16 -0700	[thread overview]
Message-ID: <20200219034416.4d82dc16@lwn.net> (raw)
In-Reply-To: <20200218125923.685-8-steve@sk2.org>

On Tue, 18 Feb 2020 13:59:22 +0100
Stephen Kitt <steve@sk2.org> wrote:

> This script allows sysctl documentation to be checked against the
> kernel source code, to identify missing or obsolete entries. Running
> it against 5.5 shows for example that sysctl/kernel.rst has two
> obsolete entries and is missing 52 entries.
> 
> Signed-off-by: Stephen Kitt <steve@sk2.org>

So I like the idea here, but I have a couple of nits and one larger
thought...
> ---
>  Documentation/admin-guide/sysctl/kernel.rst |   3 +
>  scripts/check-sysctl-docs                   | 181 ++++++++++++++++++++
>  2 files changed, 184 insertions(+)
>  create mode 100755 scripts/check-sysctl-docs
> 
> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> index a67c218c4066..3d21e076aea4 100644
> --- a/Documentation/admin-guide/sysctl/kernel.rst
> +++ b/Documentation/admin-guide/sysctl/kernel.rst
> @@ -2,6 +2,9 @@
>  Documentation for /proc/sys/kernel/
>  ===================================
>  
> +.. See scripts/check-sysctl-docs to keep this up to date
> +
> +
>  Copyright (c) 1998, 1999,  Rik van Riel <riel@nl.linux.org>
>  
>  Copyright (c) 2009,        Shen Feng<shen@cn.fujitsu.com>
> diff --git a/scripts/check-sysctl-docs b/scripts/check-sysctl-docs
> new file mode 100755
> index 000000000000..b3b47c188a2d
> --- /dev/null
> +++ b/scripts/check-sysctl-docs
> @@ -0,0 +1,181 @@
> +#!/usr/bin/gawk -f
> +# SPDX-License-Identifier: GPL-2.0-only

By Documentation/process/license-rules.rst, that should be "GPL-2.0"; the
absence of a "+" means "only".

> +# Script to check sysctl documentation against source files
> +#
> +# Copyright © 2020 Stephen Kitt

Some people object to the introduction of unnecessary non-ASCII text, and
this one would count; can we take the © symbol out?

Now for the bigger thought...  I wonder if what we really want to do is
to adopt some form of the kerneldoc format for sysctl knobs?  That would
allow the documentation to be placed in the source right next to the
table entries, which might, in the optimistic world I inhabit, help
developers to keep them up to date.

That, of course, is more work than what you've done; until somebody feels
inspired to do that work I'll happily accept a tweaked version of this
script.  But one can always dream...

Thanks,

jon

  reply	other threads:[~2020-02-19 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 12:59 [PATCH v2 0/8] docs: sysctl/kernel.rst rework Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 1/8] docs: pretty up sysctl/kernel.rst Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 2/8] docs: merge debugging-modules.txt into sysctl/kernel.rst Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 3/8] docs: drop l2cr from sysctl/kernel.rst Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 4/8] docs: add missing IPC documentation in sysctl/kernel.rst Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 5/8] docs: document stop-a " Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 6/8] docs: document panic fully " Stephen Kitt
2020-02-18 12:59 ` [PATCH v2 7/8] docs: add a script to check sysctl docs Stephen Kitt
2020-02-19 10:44   ` Jonathan Corbet [this message]
2020-02-19 15:25     ` Stephen Kitt
2020-02-19 17:33       ` Jonathan Corbet
2020-02-18 12:59 ` [PATCH v2 8/8] docs: sysctl/kernel: remove rtsig entries Stephen Kitt
2020-02-19 10:45 ` [PATCH v2 0/8] docs: sysctl/kernel.rst rework Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200219034416.4d82dc16@lwn.net \
    --to=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=steve@sk2.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).