From: Jakub Kicinski Date: Wed, 21 Jun 2023 22:35:25 +0000 (-0700) Subject: scripts: kernel-doc: support private / public marking for enums X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e27cb89a22ada4e3e7bee1567a8daa1fb2260b78;p=linux.git scripts: kernel-doc: support private / public marking for enums 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 Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Jonathan Corbet Message-ID: <20230621223525.2722703-1-kuba@kernel.org> --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2486689ffc7b4..66b5548978995 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