• C
    kernel-doc: Fix stripping of #define in enums · 8a9260aa
    Conchúr Navid 提交于
    The regex to strip single line #define's in enumerations depends on the
    fact that the defines are still stored on separate lines. But the
    surrounding code already removed newlines and replaced them with
    semicolons.
    
    For example a simple input like
    
        /**
         * enum flags - test flags
         * @flag1: first flag
         * @flag2: second flag
         * @flag3: third flag
         * @flag4: fourth flag
         */
        enum flags {
        	flag1 = BIT(0),
        	flag2 = BIT(1),
        #define flags_small (flag1 | flag2)
        	flag3 = BIT(2),
        	flag4 = BIT(3),
        #define flags_big (flag2 | flag3)
        };
    
    resulted in parsing warnings like
    
        warning: Enum value '#define flags_small (flag1 | flag2);flag3 = BIT(2)' not described in enum 'flags'
        warning: Enum value '#define flags_big (flag2 | flag3);' not described in enum 'flags'
    Signed-off-by: NConchúr Navid <conchur@web.de>
    Signed-off-by: NJonathan Corbet <corbet@lwn.net>
    8a9260aa
kernel-doc 76.0 KB