Lines Matching refs:KernRe

19 from kdoc_re import NestedMatch, KernRe
32 doc_start = KernRe(r'^/\*\*\s*$', cache=False)
34 doc_end = KernRe(r'\*/', cache=False)
35 doc_com = KernRe(r'\s*\*\s*', cache=False)
36 doc_com_body = KernRe(r'\s*\* ?', cache=False)
37 doc_decl = doc_com + KernRe(r'(\w+)', cache=False)
47 known_sections = KernRe(known_section_names, flags = re.I)
49 KernRe(r'\s*(\@[.\w]+|\@\.\.\.|' + known_section_names + r')\s*:([^:].*)?$',
52 doc_content = doc_com_body + KernRe(r'(.*)', cache=False)
53 doc_inline_start = KernRe(r'^\s*/\*\*\s*$', cache=False)
54 doc_inline_sect = KernRe(r'\s*\*\s*(@\s*[\w][\w\.]*\s*):(.*)', cache=False)
55 doc_inline_end = KernRe(r'^\s*\*/\s*$', cache=False)
56 doc_inline_oneline = KernRe(r'^\s*/\*\*\s*(@[\w\s]+):\s*(.*)\s*\*/\s*$', cache=False)
57 attribute = KernRe(r"__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)",
60 export_symbol = KernRe(r'^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*', cache=False)
61 export_symbol_ns = KernRe(r'^\s*EXPORT_SYMBOL_NS(_GPL)?\s*\(\s*(\w+)\s*,\s*"\S+"\)\s*', cache=False)
63 type_param = KernRe(r"\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)", cache=False)
68 doc_block = doc_com + KernRe(r'DOC:\s*(.*)?', cache=False)
69 doc_begin_data = KernRe(r"^\s*\*?\s*(struct|union|enum|typedef)\b\s*(\w*)", cache = False)
70 doc_begin_func = KernRe(str(doc_com) + # initial " * '
80 multi_space = KernRe(r'\s\s+')
319 param = KernRe(r'[\[\)].*').sub('', param, count=1)
322 if KernRe(r'\w\.\.\.$').search(param):
376 org_arg = KernRe(r'\s\s+').sub(' ', org_arg)
387 arg_expr = KernRe(r'(\([^\),]+),')
393 arg = KernRe(r'\/\*.*\*\/').sub('', arg)
396 arg = KernRe(r'\sPOS0?\s').sub(' ', arg)
400 arg = KernRe(r'\s+').sub(' ', arg, count=1)
411 elif KernRe(r'\(.+\)\s*\(').search(arg):
416 r = KernRe(r'[^\(]+\(\*?\s*([\w\[\]\.]*)\s*\)')
423 dtype = KernRe(r'([^\(]+\(\*?)\s*' + re.escape(param)).sub(r'\1', arg)
427 elif KernRe(r'\(.+\)\s*\[').search(arg):
431 r = KernRe(r'[^\(]+\(\s*\*\s*([\w\[\]\.]*?)\s*(\s*\[\s*[\w]+\s*\]\s*)*\)')
438 dtype = KernRe(r'([^\(]+\(\*?)\s*' + re.escape(param)).sub(r'\1', arg)
444 arg = KernRe(r'\s*:\s*').sub(":", arg)
445 arg = KernRe(r'\s*\[').sub('[', arg)
447 args = KernRe(r'\s*,\s*').split(arg)
452 r = KernRe(r'^(.*\s+)(.*?\[.*\].*)$')
458 first_arg = KernRe(r'\s+').split(args.pop(0))
464 if KernRe(r'^(\*+)\s*(.*)').match(param):
465 r = KernRe(r'^(\*+)\s*(.*)')
476 elif KernRe(r'(.*?):(\w+)').search(param):
477 r = KernRe(r'(.*?):(\w+)')
516 if not return_type or KernRe(r'void\s*\w*\s*$').search(return_type):
539 struct_members = KernRe(type_pattern + r'([^\{\};]+)(\{)([^\{\}]*)(\})([^\{\}\;]*)(\;)')
546 r = KernRe(type_pattern + r'\s+(\w+)\s*' + definition_body)
552 r = KernRe(r'typedef\s+' + type_pattern + r'\s*' + definition_body + r'\s*(\w+)\s*;')
571 (KernRe(r'\/\*\s*private:.*?\/\*\s*public:.*?\*\/', re.S | re.I), ''),
572 (KernRe(r'\/\*\s*private:.*', re.S | re.I), ''),
575 (KernRe(r'\/\*.*?\*\/', re.S), ''),
579 (KernRe(r'\s*__aligned\s*\([^;]*\)', re.S), ' '),
580 (KernRe(r'\s*__counted_by\s*\([^;]*\)', re.S), ' '),
581 (KernRe(r'\s*__counted_by_(le|be)\s*\([^;]*\)', re.S), ' '),
582 (KernRe(r'\s*__packed\s*', re.S), ' '),
583 (KernRe(r'\s*CRYPTO_MINALIGN_ATTR', re.S), ' '),
584 (KernRe(r'\s*____cacheline_aligned_in_smp', re.S), ' '),
585 (KernRe(r'\s*____cacheline_aligned', re.S), ' '),
620 (KernRe(r'\bstruct_group\s*\(([^,]*,)', re.S), r'STRUCT_GROUP('),
621 (KernRe(r'\bstruct_group_attr\s*\(([^,]*,){2}', re.S), r'STRUCT_GROUP('),
622 … (KernRe(r'\bstruct_group_tagged\s*\(([^,]*),([^,]*),', re.S), r'struct \1 \2; STRUCT_GROUP('),
623 (KernRe(r'\b__struct_group\s*\(([^,]*,){3}', re.S), r'STRUCT_GROUP('),
632 …(KernRe(r'__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)', re.S), r'DECLARE_BITMAP(\1, __ETHTOOL_…
633 …(KernRe(r'DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)', re.S), r'DECLARE_BITMAP(\1, PHY_INTERFACE_MO…
634 …(KernRe(r'DECLARE_BITMAP\s*\(' + args_pattern + r',\s*' + args_pattern + r'\)', re.S), r'unsigned …
635 …(KernRe(r'DECLARE_HASHTABLE\s*\(' + args_pattern + r',\s*' + args_pattern + r'\)', re.S), r'unsign…
636 …(KernRe(r'DECLARE_KFIFO\s*\(' + args_pattern + r',\s*' + args_pattern + r',\s*' + args_pattern + r…
637 …(KernRe(r'DECLARE_KFIFO_PTR\s*\(' + args_pattern + r',\s*' + args_pattern + r'\)', re.S), r'\2 *\1…
638 …(KernRe(r'(?:__)?DECLARE_FLEX_ARRAY\s*\(' + args_pattern + r',\s*' + args_pattern + r'\)', re.S), …
639 (KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + args_pattern + r'\)', re.S), r'dma_addr_t \1'),
640 (KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + args_pattern + r'\)', re.S), r'__u32 \1'),
641 …(KernRe(r'VIRTIO_DECLARE_FEATURES\s*\(' + args_pattern + r'\)', re.S), r'u64 \1; u64 \1_array[VIRT…
694 s_id = KernRe(r'[:\[].*').sub('', s_id)
695 s_id = KernRe(r'^\s*\**(\S+)\s*').sub(r'\1', s_id)
703 r = KernRe(r'^([^\(]+\(\*?\s*)([\w\.]*)(\s*\).*)')
722 arg = KernRe(r':\s*\d+\s*').sub('', arg)
725 arg = KernRe(r'\[.*\]').sub('', arg)
728 arg = KernRe(r'\s*,\s*').sub(',', arg)
730 r = KernRe(r'(.*)\s+([\S+,]+)')
740 name = KernRe(r'^\s*\**(\S+)\s*').sub(r'\1', name).strip()
761 declaration = KernRe(r'([\{;])').sub(r'\1\n', declaration)
762 declaration = KernRe(r'\}\s+;').sub('};', declaration)
766 r = KernRe(r'(enum\s+\{[^\}]+),([^\n])')
778 clause = KernRe(r'\s+').sub(' ', clause, count=1)
786 if not KernRe(r'^\s*#').match(clause):
803 proto = KernRe(r'\/\*\s*private:.*?\/\*\s*public:.*?\*\/', flags=re.S).sub('', proto)
804 proto = KernRe(r'\/\*\s*private:.*}', flags=re.S).sub('}', proto)
807 proto = KernRe(r'\/\*.*?\*\/', flags=re.S).sub('', proto)
810 proto = KernRe(r'#\s*((define|ifdef|if)\s+|endif)[^;]*;', flags=re.S).sub('', proto)
815 r = KernRe(r'typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;')
823 r = KernRe(r'enum\s+(\w*)\s*\{(.*)\}')
853 members = KernRe(r'\([^;)]*\)').sub('', members)
857 arg = KernRe(r'^\s*(\w+).*').sub(r'\1', arg)
942 prototype = KernRe(search, flags).sub(sub, prototype)
945 new_proto = KernRe(r"^#\s*define\s+").sub("", prototype)
982 r = KernRe(r'^()(' + name + r')\s+')
999 r = KernRe(p)
1048 typedef1 = KernRe(r'typedef' + typedef_type + r'\(' + typedef_ident + r'\)' + typedef_args)
1049 typedef2 = KernRe(r'typedef' + typedef_type + typedef_ident + typedef_args)
1052 proto = KernRe(r'/\*.*?\*/', flags=re.S).sub('', proto)
1078 r = KernRe(r'(\(*.\)\s*|\[*.\]\s*);$')
1083 r = KernRe(r'typedef.*\s+(\w+)\s*;')
1196 r = KernRe("[-:](.*)")
1265 r = KernRe(r'\s*\*\s*[a-zA-Z_0-9:\.]+\*/')
1314 if KernRe(r"\s*\*\s*$").match(line):
1335 r = KernRe(r'^(\s+)')
1411 proto = KernRe(r'SYSCALL_DEFINE.*\(').sub('long sys_', proto)
1413 r = KernRe(r'long\s+(sys_.*?),')
1415 proto = KernRe(',').sub('(', proto, count=1)
1417 proto = KernRe(r'\)').sub('(void)', proto, count=1)
1444 r = KernRe(r'TRACE_EVENT\((.*?),')
1448 r = KernRe(r'DEFINE_SINGLE_EVENT\((.*?),')
1452 r = KernRe(r'DEFINE_EVENT\((.*?),(.*?),')
1459 r = KernRe(r'TP_PROTO\((.*?)\)')
1476 line = KernRe(r"\/\/.*$", re.S).sub('', line)
1480 if KernRe(r'\s*#\s*define').match(line):
1483 r = KernRe(r'([^\{]*)')
1489 if '{' in line or ';' in line or KernRe(r'\s*#\s*define').match(line):
1491 self.entry.prototype = KernRe(r'/\*.*\*/').sub('', self.entry.prototype).strip()
1498 r = KernRe(r'^(\S+\s+)\(\s*\*(\S+)\)')
1507 r = KernRe(r'TRACE_EVENT|DEFINE_EVENT|DEFINE_SINGLE_EVENT')
1521 line = KernRe(r"//.*$", re.S).sub('', line).strip()
1532 r = KernRe(r'(.*?)([{};])')