• N
    scripts/kernel-doc: handle struct member __aligned without numbers · 9dc30918
    Nishanth Menon 提交于
    Commit ef5da59f ("scripts/kernel-doc: handle struct member
    __aligned") permits "char something [123] __aligned(8);".
    
    However, by using \d we constraint ourselves with integers.  This is not
    always the case.  In fact, it might be better to do char something[123]
    __aligned(sizeof(u16));
    
    For example, With wireless_dev defining:
    
        u8 address[ETH_ALEN] __aligned(sizeof(u16));
    
    With \d, scripts/kernel-doc erroneously says:
    
        Warning(include/net/cfg80211.h:2618): Excess struct/union/enum/typedef member 'address' description in 'wireless_dev'
    
    This is because the regex __aligned\s*\(\d+\) fails match at \d as
    sizeof is used.
    
    So replace \d with .  to indicate "something" in kernel-doc to ignore
    __aligned(SOMETHING) in structs.  With this change, we can use integers
    OR sizeof() or macros as we please.
    Signed-off-by: NNishanth Menon <nm@ti.com>
    Cc: Fengguang Wu <fengguang.wu@intel.com>
    Cc: Johannes Berg <johannes.berg@intel.com>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Michal Marek <mmarek@suse.cz>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    9dc30918
kernel-doc 71.4 KB