summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-21 15:35:25 -0700
committerJonathan Corbet <corbet@lwn.net>2023-07-04 08:30:49 -0600
commite27cb89a22ada4e3e7bee1567a8daa1fb2260b78 (patch)
treeed9ddbfd1f3c6a9b51fafcbd596f723fc3b72dc7 /scripts
parent1e6115f50bca20417e9d4d95ce99e36d6f145fa4 (diff)
downloadlinux-e27cb89a22ada4e3e7bee1567a8daa1fb2260b78.tar.gz
linux-e27cb89a22ada4e3e7bee1567a8daa1fb2260b78.tar.bz2
linux-e27cb89a22ada4e3e7bee1567a8daa1fb2260b78.zip
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 <kuba@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20230621223525.2722703-1-kuba@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kernel-doc3
1 files changed, 3 insertions, 0 deletions
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