Skip to content

Commit e27cb89

Browse files
kuba-mooJonathan Corbet
authored andcommitted
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]>
1 parent 1e6115f commit e27cb89

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/kernel-doc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,9 @@ sub dump_enum($$) {
13011301
my $file = shift;
13021302
my $members;
13031303

1304+
# ignore members marked private:
1305+
$x =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
1306+
$x =~ s/\/\*\s*private:.*}/}/gosi;
13041307

13051308
$x =~ s@/\*.*?\*/@@gos; # strip comments.
13061309
# strip #define macros inside enums

0 commit comments

Comments
 (0)