Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4573000pxk; Wed, 30 Sep 2020 06:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmzNkNIRIr98CZ1TfvVE+B5HiMpdWCvlEanr63xcAp+Lwbn0Sj+QrfxN/HMGjjyW69WM9Y X-Received: by 2002:a17:906:9245:: with SMTP id c5mr3012892ejx.54.1601472842666; Wed, 30 Sep 2020 06:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601472842; cv=none; d=google.com; s=arc-20160816; b=qYULOcsHUBeJVCbUbWR+xkC5uR0dqmwAZUojVZd83SYMkJXoyShWw/XPcpx3HjTpOb f3RS4EcKHu6E2XabzvMvCD/gG5Ac8FtHKeRpSWASIkjyUJl4T7IkUx8qlIBwqClPBRhv XGNFh4V60oP6x7JBTZozqOA09qinNTKSXfRgwOI1Kt7Th7+hyl1plgwMvwugJYFAH7rg o2LhDa96IUm3qHgT/tRyRcrceguVbObA6RrVjCel5cHVpaIuuPdobMkg+LdvY2h7eBdN QCNiVzPaslwJ9WQqp4EfbiyOHA0iPkMchd0l/lbtufG1w6p82sryS/6z8S+iecnyfmTU X5Jw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VXCVAsgneONX0aoWFU4GLQ3keVZzD3pgMKq9QJFME60=; b=odpPF+FDMuFP2CVlULbnKKJNb7PTNU70vNIienSkhJzidefpqMVaTldIZeaod5X8jl Esm2Dptm4cvsHoAvjZr6xmcBqlH6SzeDp6pTIK0KL7GC6guEAAxjWBVYy4kPIvTDoDVV hErE62BWnpbxOACOgE5s0mye6yKHvC41RiHUwCIewpAeFCxGQMWtcIxRQFLtXZR3WL+Q BaIFLdmguBJ/VvNQklqhdInxR/huMZ6vySzhckJepup5kpT20OSF6r/YTgvv33U6l5NX sVEJLBMAcJPFa56BLYMiI00YOIzNvuOpR1rXZF5ZvZy172xHoKt1i+n9Lvt1p7cQF9im Z6mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pzsrPi24; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si1089690ejd.647.2020.09.30.06.33.39; Wed, 30 Sep 2020 06:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pzsrPi24; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730844AbgI3N25 (ORCPT + 99 others); Wed, 30 Sep 2020 09:28:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:38720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730098AbgI3NZU (ORCPT ); Wed, 30 Sep 2020 09:25:20 -0400 Received: from mail.kernel.org (unknown [95.90.213.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3024207C3; Wed, 30 Sep 2020 13:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601472319; bh=Rn7zJJ3ZS9RPVx8dkqXQwAQflBR7NMWGCPQ1PdLSg4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pzsrPi24Ig2jYz9uBi/LepfZWrzZ+z2XmRhXP8DlARLdfGUuekn4zWwl9OhbUdfAH 01oqvKaBikCFZVyS0D+QvLWcviP6iUAYgOkojFz5x28QdXXCZ5CCfwZJj29+m3xspL 8Z0PBOsvY/y1N+LSjsyVXiJAXliwdSihHH3YnwWg= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kNc6f-001XJH-Sb; Wed, 30 Sep 2020 15:25:17 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Changbin Du , linux-kernel@vger.kernel.org Subject: [PATCH v4 11/52] docs: kerneldoc.py: add support for kerneldoc -nosymbol Date: Wed, 30 Sep 2020 15:24:34 +0200 Message-Id: <6a783af454048eb1f421f0400f986248e7d53eb1.1601467849.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, there's no way to exclude identifiers from a kernel-doc markup. Add support for it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/doc-guide/kernel-doc.rst | 8 ++++++++ Documentation/sphinx/kerneldoc.py | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst index 4fd86c21397b..52a87ab4c99f 100644 --- a/Documentation/doc-guide/kernel-doc.rst +++ b/Documentation/doc-guide/kernel-doc.rst @@ -490,6 +490,14 @@ identifiers: *[ function/type ...]* .. kernel-doc:: lib/idr.c :identifiers: +no-identifiers: *[ function/type ...]* + Exclude documentation for each *function* and *type* in *source*. + + Example:: + + .. kernel-doc:: lib/bitmap.c + :no-identifiers: bitmap_parselist + functions: *[ function/type ...]* This is an alias of the 'identifiers' directive and deprecated. diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py index 6686955d1def..233f610539f0 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -62,6 +62,7 @@ class KernelDocDirective(Directive): 'export': directives.unchanged, 'internal': directives.unchanged, 'identifiers': directives.unchanged, + 'no-identifiers': directives.unchanged, 'functions': directives.unchanged, } has_content = False @@ -99,6 +100,12 @@ class KernelDocDirective(Directive): else: cmd += ['-no-doc-sections'] + if 'no-identifiers' in self.options: + no_identifiers = self.options.get('no-identifiers').split() + if no_identifiers: + for i in no_identifiers: + cmd += ['-nosymbol', i] + for pattern in export_file_patterns: for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern): env.note_dependency(os.path.abspath(f)) -- 2.26.2