scripts: kernel-doc: support private / public marking for enums
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 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.
---
Hi Jon, we've CCed you recently on a related discussion but it appears that the fix is simple enough so posting it before you had a chance to reply.
--- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+)
scripts/kernel-doc +3 -0
@@ -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
Signature · 1 line
2.40.1
Quoted 5 lines · Jakub Kicinski
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]>
Thanks.
Quoted 22 lines
---
Hi Jon, we've CCed you recently on a related discussion but it appears that the fix is simple enough so posting it before you had a chance to reply.--- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+)scripts/kernel-doc +3
-0@@ -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
Signature · 1 line
~Randy
Randy Dunlap
reviewerHi Jon,
Quoted 7 lines · Randy Dunlap
Quoted 4 lines · Jakub Kicinski
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Jakub Kicinski <[email protected]>Reviewed-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Thanks.
I have a need for this patch. Are you planning to merge it?
in current linux-next docs build:
../include/drm/drm_connector.h:527: warning: Enum value 'DRM_MODE_COLORIMETRY_COUNT' not described in enum 'drm_colorspace'
That enum identifier could/should be marked as private:.
Thanks.
Quoted 24 lines
Quoted 23 lines
---
Hi Jon, we've CCed you recently on a related discussion but it appears that the fix is simple enough so posting it before you had a chance to reply.--- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+)scripts/kernel-doc +3
-0@@ -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
Signature · 1 line
~Randy
Jonathan Corbet
maintainerQuoted 10 lines · Randy Dunlap
Hi Jon,
Quoted 7 lines · Randy Dunlap
Quoted 4 lines · Jakub Kicinski
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.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Jakub Kicinski <[email protected]>Reviewed-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Thanks.
I have a need for this patch. Are you planning to merge it?
It's commit e27cb89a22ad in 6.5-rc1 ...
Thanks,
jon
Randy Dunlap
reviewerQuoted 14 lines · Jonathan Corbet
Quoted 12 lines · Randy Dunlap
Hi Jon,
Quoted 9 lines · Randy Dunlap
Quoted 5 lines · Jakub Kicinski
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]>
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Reviewed-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Thanks.
I have a need for this patch. Are you planning to merge it?
It's commit
e27cb89a22adin 6.5-rc1 ...
Oops, my bad, sorry about that.
I'm testing with linux-next. Something is rotten here /methinks.
I will check it out.
Signature · 1 line
~Randy
Randy Dunlap
reviewerQuoted 24 lines · Randy Dunlap
Quoted 21 lines · Jonathan Corbet
Quoted 18 lines · Randy Dunlap
Hi Jon,
Quoted 7 lines · Randy Dunlap
Quoted 4 lines · Jakub Kicinski
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.
Quoted 6 lines
Quoted 1 line
Signed-off-by Jakub Kicinski <[email protected]>Reviewed-by Randy Dunlap <[email protected]>Tested-by Randy Dunlap <[email protected]>Thanks.
I have a need for this patch. Are you planning to merge it?
Quoted 7 lines
Quoted 1 line
It's commit
e27cb89a22adin 6.5-rc1 ...Oops, my bad, sorry about that.
I'm testing with linux-next. Something is rotten here /methinks.
I will check it out.
Apparently this was due to user error -- it works today. Sorry about the noise.
Jonathan Corbet
maintainerQuoted 4 lines · Jakub Kicinski
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.
Quoted 8 lines
Signed-off-by Jakub Kicinski <[email protected]>---
Hi Jon, we've CCed you recently on a related discussion but it appears that the fix is simple enough so posting it before you had a chance to reply.--- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+)
Hmm...somehow I missed the discussion, sorry. Fix applied, thanks.
jon