Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp441833ybv; Wed, 19 Feb 2020 02:44:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzUnDCGHborzimwRWJ5HfjCtnWNu7O8bCJPBs2UM5UNZSKWXGz/Obr+TjJsBIjrc/Qu4wfD X-Received: by 2002:aca:b608:: with SMTP id g8mr4393434oif.142.1582109092336; Wed, 19 Feb 2020 02:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582109092; cv=none; d=google.com; s=arc-20160816; b=XAAhRs1m+AN2q6CLcOgLVV44F4vNQZZgsXpacrGmLK2fDt5aN0KALOywZx4xTDZ3JE zo7hBqxa/IwJl3WZMArxdJDl6nEqTkMZCx91uptRPgyOlhHPt82dllhg6I1JxIfU45SA jRMiHKibJ4mqSCnbTWPNyvXzhipWCNeeHR4JjY6cwv9JBNYrQtDR89wyZY/9kfNNwYEW ChoWm5nhZl5Wog7kJ1KVT1gULIVG0/nN0fxDm5xzBxn7PqcgPA0LVtl+SGIjtLckZPAk 3SlJLkNgFPlaVvlfFDjKFNRHswr/ZTtvM5rNor5Q7qI0tzaIDRBOk6xps/1oiuGpGk0y Co8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=nz6p4hsY3c364wGF1R+VIYjmfRfm3MWMO5LxareewJ8=; b=NsSgxVvdA/80hsH+A0CNiFFsUghEHhjfEMlwSESbnAvFVWnnzb6aILkxVvjHiCxv7j X1nt3uCp4O8mQKW2QL7HLgW5s/hzSuTBwcw1y3cLyRxrT8CvCz6UDpjqUlvs6vfprB3A fIpLqMdXjO8nurNLmK6UoDdSY1ZsXXF3pyEPPQ8ZBlYFYd6+vkylrMeMt6kV7wQIxZjE /7jamX3xtJBw5oNiEomUt6hIppzGT8SgZp4EeuzGejaQUmSwKjGZTNj2eLSmSTrWoS9S T9XXbfu2te44Q0NNIJRV/3kDjqVkVFbdqTtD+c70XMlgUhPuexONfAABmJyfpJU/+NLW /GWQ== 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 d14si897076ote.195.2020.02.19.02.44.39; Wed, 19 Feb 2020 02:44:52 -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 S1726788AbgBSKoY (ORCPT + 99 others); Wed, 19 Feb 2020 05:44:24 -0500 Received: from ms.lwn.net ([45.79.88.28]:33734 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbgBSKoX (ORCPT ); Wed, 19 Feb 2020 05:44:23 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id D88832DC; Wed, 19 Feb 2020 10:44:21 +0000 (UTC) Date: Wed, 19 Feb 2020 03:44:16 -0700 From: Jonathan Corbet To: Stephen Kitt 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: <20200219034416.4d82dc16@lwn.net> In-Reply-To: <20200218125923.685-8-steve@sk2.org> References: <20200218125923.685-1-steve@sk2.org> <20200218125923.685-8-steve@sk2.org> Organization: LWN.net X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Feb 2020 13:59:22 +0100 Stephen Kitt 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 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 > > 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 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