Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp819909ybv; Wed, 19 Feb 2020 09:53:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxv4Ou3ybbEYPB7u/aR7PWZBUjQ4dVzgHgfdHARl7J5ckAWZMT3h8PvOJDb2XPfzEUZU67i X-Received: by 2002:a05:6830:18f5:: with SMTP id d21mr20312250otf.225.1582134808594; Wed, 19 Feb 2020 09:53:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582134808; cv=none; d=google.com; s=arc-20160816; b=covgDjDmC5qpYP0WLw6v473sBdO4HlEwJHr7eGUMdi+xkn5SgbLg8apNWy9lV9FRxS RqEfl1Wn/Je6XaOguIPtfgELCGWM/qRbT6Gb13nQjL+5fPvZ0YrY41xuvbiCEPqvVTvk +Ojj2/kaLFemTymQX2ysUJEWB3izlpVoJeKwaHmf4lLGKMycNue9RXwG0eVkPjxqOXFN 6WGleuClKlNCRJZk+S9j15FCkVFXCJHKr3OLNoKAp5PlK9XtYNxHjw/G/+DsowVcKBI9 REwcgbNkB9BHDFsbflUmrlCLAeGrv/3l1FOtEYZ/Zy2ynG7hGBl0bU2KpdDtU2zQ/82z BFsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=/elf6FtSWje3nX4N4eAsKA3Dnl3pAFA0eOToU/vDBPo=; b=PpAyWIkmbfLhW4gmCVRMXUWKkQXDSVQDWtGjjnlNPLHojK7JU2vvhtsUpuYrnRl6Pv SVmivryDe9VqtFmCCifZFDH5dJHGuFXYTHlk9eD7JQ50AmwB22fOGDNZFOs0pG35IKzw rEpDXSKsAe5dOojLUoifv1Lj4GlN9jy2vcg3Z+drBCApHRG4m8iEdhBXWQ9iehWhdsvW QVzQPWqM4olirelRO9dMncpCBAH+Yrp8Zag6oL5z1gLER2qJcdZa2MIop88ZiN4DEg2W w/58uEgLyyzKhULgnM/wU9KMk9aeouG0kz1OxUo+rMKTGzXIwbvHMO7veiLDSRrLQT6s LmAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si9622431oib.59.2020.02.19.09.53.16; Wed, 19 Feb 2020 09:53:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727161AbgBSRvy (ORCPT + 99 others); Wed, 19 Feb 2020 12:51:54 -0500 Received: from 17.mo5.mail-out.ovh.net ([46.105.56.132]:32778 "EHLO 17.mo5.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbgBSRvx (ORCPT ); Wed, 19 Feb 2020 12:51:53 -0500 Received: from player732.ha.ovh.net (unknown [10.108.54.108]) by mo5.mail-out.ovh.net (Postfix) with ESMTP id 8388D26DB78 for ; Wed, 19 Feb 2020 16:25:44 +0100 (CET) Received: from sk2.org (cre33-1_migr-88-122-126-116.fbx.proxad.net [88.122.126.116]) (Authenticated sender: steve@sk2.org) by player732.ha.ovh.net (Postfix) with ESMTPSA id B1DE9F6E8590; Wed, 19 Feb 2020 15:25:30 +0000 (UTC) Date: Wed, 19 Feb 2020 16:25:27 +0100 From: Stephen Kitt To: Jonathan Corbet Cc: Mauro Carvalho Chehab , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/8] docs: add a script to check sysctl docs Message-ID: <20200219162527.61f99f45@heffalump.sk2.org> In-Reply-To: <20200219034416.4d82dc16@lwn.net> References: <20200218125923.685-1-steve@sk2.org> <20200218125923.685-8-steve@sk2.org> <20200219034416.4d82dc16@lwn.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/8aiAfeT7zL00iNcRndrs1tp"; protocol="application/pgp-signature" X-Ovh-Tracer-Id: 6014557304425893253 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrkedtgdejjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkjghfofggtgesghdtreerredtjeenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuffhomhgrihhnpehsphgugidrohhrghenucfkpheptddrtddrtddrtddpkeekrdduvddvrdduvdeirdduudeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeefvddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehsthgvvhgvsehskhdvrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/8aiAfeT7zL00iNcRndrs1tp Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Jon, On Wed, 19 Feb 2020 03:44:16 -0700, Jonathan Corbet wrote: > On Tue, 18 Feb 2020 13:59:22 +0100 > Stephen Kitt wrote: >=20 > > 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. > >=20 > > Signed-off-by: Stephen Kitt =20 >=20 > 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 > >=20 > > 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/ > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > =20 > > +.. See scripts/check-sysctl-docs to keep this up to date > > + > > + > > Copyright (c) 1998, 1999, Rik van Riel > > =20 > > Copyright (c) 2009, Shen Feng > > 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 =20 >=20 > By Documentation/process/license-rules.rst, that should be "GPL-2.0"; the > absence of a "+" means "only". Ah, thanks, I hadn=E2=80=99t noticed that. I=E2=80=99m used to the SPDX ide= ntifiers listed on the LF website, https://spdx.org/licenses/GPL-2.0-only.html in this case. (I=E2=80=99m not alone apparently, see =E2=80=9Cgit grep GPL-2.0-only=E2=80= =9D...) > > +# Script to check sysctl documentation against source files > > +# > > +# Copyright =C2=A9 2020 Stephen Kitt =20 >=20 > Some people object to the introduction of unnecessary non-ASCII text, and > this one would count; can we take the =C2=A9 symbol out? Yes, of course! > 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. >=20 > 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... Right, that occurred to me too. In fact, it seems to me that in an ideal world, we wouldn=E2=80=99t even have the big tables of sysctl entries, sinc= e that=E2=80=99s another level of indirection =E2=80=94 in most cases, the relevant informat= ion is available where the sysctl variables are declared, not where they=E2=80=99re registered in the tables. This leads to disconnects between the reality of the code and sysctl table entries, for example ieee_emulation_warnings which is (for now, I=E2=80=99ve submitted a patch which has been accepted) still = present in sysctl.c but isn=E2=80=99t used. I=E2=80=99ll fix up the script and re-submit it. Regards, Stephen --Sig_/8aiAfeT7zL00iNcRndrs1tp Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAl5NU2cACgkQgNMC9Yht g5z9fg//c1jrqDfffwelVx3N+CXd/LBNiLqg1IumxfFYP1rzs0OAAYmaNz0zhPXO 0uSjU8ajZULVBJQrmAYQh//sIz9g6O9K7R4UvpGm47rLAVg0ZTFEC5ieiUgl5EMs 5IHtNBs1EvJ7dMz7UW/QjCUeeKfDpvmOK+aEtMMsULB8kzdDiR+XAVKjwCvG+tcp HQN3BBYlEiyyAq+TzdErYYbp67kGY+Fktnwz53JodyQSMBlC5vsvdA2I3PpBFaNh kxb+3spvwqRr3Vit8wM55Cyy/b/8sE5bPtDkrNpGWrca47xJIUshF8zpQO5+IIXz 2HBV1SjP7Y9DjUAm1ayq7twMHDj2G9NgYrQRj+LGgy0x8bVCQEwblDjkoGdEoOCk NisjujY/HFGLtbR+oyEi+yaCVTgY32mA5gkhU51wpDLOkvaQtivmqahVxasXJFDE wfaYjkV618MJNrsAyu0FJ6XxSrwcVoqBaqiXqpk9ju15tdXJrqflJTzjQLBgwXIV LnZerphOvcpdnPiYBIFrb/DfLlGfSMGUD63kOS9zT6Aeideh0/eGP+yQkNkExZL5 J41/6R6P7gBdygUbz95FtdetWTVSzhKQekjzyM1W1TVs4Fjlnz4bkyNEnPwK9d5Q IA26Zu0qDAWwyoEzaUVshm60dX8HwBVLe48evT6FrRyUuj8t+y0= =89jA -----END PGP SIGNATURE----- --Sig_/8aiAfeT7zL00iNcRndrs1tp--