Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kdoc: remove a single-use variable

struct_attribute is only used once, so just put its value there directly
and drop the name.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>

+1 -3
+1 -3
scripts/lib/kdoc/kdoc_parser.py
··· 76 76 # Here begins a long set of transformations to turn structure member prefixes 77 77 # and macro invocations into something we can parse and generate kdoc for. 78 78 # 79 - struct_attribute = KernRe(r"__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)", 80 - flags=re.I | re.S, cache=False) 81 79 struct_args_pattern = r'([^,)]+)' 82 80 83 81 struct_prefixes = [ 84 82 # Strip attributes 85 - (struct_attribute, ' '), 83 + (KernRe(r"__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)", flags=re.I | re.S, cache=False), ' '), 86 84 (KernRe(r'\s*__aligned\s*\([^;]*\)', re.S), ' '), 87 85 (KernRe(r'\s*__counted_by\s*\([^;]*\)', re.S), ' '), 88 86 (KernRe(r'\s*__counted_by_(le|be)\s*\([^;]*\)', re.S), ' '),