Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9A31EDC for ; Wed, 21 Jun 2023 22:35:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A247C433C0; Wed, 21 Jun 2023 22:35:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687386927; bh=EWnSd7bjG7PilttbL5ZZpTzcZo8e3vUQoklthxd0EVc=; h=From:To:Cc:Subject:Date:From; b=IKHFCF5e2D0cFFU4Tg/JNKd+613yz0i7qT+vcb6XRp1cNDYKcBpNVmCQcCCFy0iry cuU9ee1Pzqo6/i/PF4WEdVsxYGxb7WTLvA7ZYotJoZxuH3I+WGlQKXozTfcgYwki88 LLOugFruXBP2E2r15PlBMzWTUaizFWJ8F2+qn3NjN7JiSuTu70htbTy2OdM+Dez7fU 4Hx5ZZ4Bs3pM6ANyac8pGO8GIvO/HjUd3cuFthjdguT3esRZweqJcWX9nOnJPS5eUW v2noU+NcQapPNwuvDGjWdVzqgcKGqzdrSg2ptXkBMYc6A5/bm2xGjkUdmGSt1ZchcF Sh9Wfvwqbqw6g== From: Jakub Kicinski To: corbet@lwn.net Cc: linux-doc@vger.kernel.org, arkadiusz.kubalewski@intel.com, netdev@vger.kernel.org, Jakub Kicinski Subject: [PATCH docs] scripts: kernel-doc: support private / public marking for enums Date: Wed, 21 Jun 2023 15:35:25 -0700 Message-Id: <20230621223525.2722703-1-kuba@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Enums benefit from private markings, too. For netlink attribute name enums always end with a pair of __$n_MAX and $n_MAX members. Documenting them feels a bit tedious. Signed-off-by: Jakub Kicinski --- Hi Jon, we've CCed you recently on a related discussion but it appears that the fix is simple enough so posting it before you had a chance to reply. --- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2486689ffc7b..66b554897899 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1301,6 +1301,9 @@ sub dump_enum($$) { my $file = shift; my $members; + # ignore members marked private: + $x =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi; + $x =~ s/\/\*\s*private:.*}/}/gosi; $x =~ s@/\*.*?\*/@@gos; # strip comments. # strip #define macros inside enums -- 2.40.1