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 <[email protected]>
Reviewed-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
Message-ID: <[email protected]>
This commit is contained in:
Jakub Kicinski
2023-07-04 08:30:49 -06:00
committed by Jonathan Corbet
parent 1e6115f50b
commit e27cb89a22
+3
View File
@@ -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