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 <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>
1 parent 1e6115f commit e27cb89

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)