mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									1e6115f50b
								
							
						
					
					
						commit
						e27cb89a22
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue