Lines Matching refs:line
247 my $line = $_;
249 $line =~ s/\s*\n?$//g;
250 $line =~ s/^\s*//g;
251 $line =~ s/\s+/ /g;
253 next if ($line =~ m/^\s*#/);
254 next if ($line =~ m/^\s*$/);
256 my @words = split(" ", $line);
276 my $line = $_;
277 $line =~ s/\s+$//;
279 if ($line =~ /^\s*\*\*(.+)\*\*$/) {
287 if ($line =~ /^(?:\s{4,}|$)/) {
288 $line =~ s/^\s{4}//;
289 $desc .= $line;
952 my $line = $_;
954 $line =~ s/\s*\n?$//g;
955 $line =~ s/^\s*//g;
957 next if ($line =~ m/^\s*#/);
958 next if ($line =~ m/^\s*$/);
960 my ($suspect, $fix) = split(/\|\|/, $line);
972 my $line = $_;
974 $line =~ s/\s*\n?$//g;
975 $line =~ s/^\s*//g;
977 next if ($line =~ m/^\s*#/);
978 next if ($line =~ m/^\s*$/);
979 next if ($line =~ m/, disabled/i);
981 $line =~ s/,.*$//;
983 my ($suspect, $fix) = split(/->/, $line);
1000 my $line = $_;
1002 $line =~ s/\s*\n?$//g;
1003 $line =~ s/^\s*//g;
1005 next if ($line =~ m/^\s*#/);
1006 next if ($line =~ m/^\s*$/);
1007 if ($line =~ /\s/) {
1008 print("$file: '$line' invalid - ignored\n");
1013 $$wordsRef .= $line;
1137 foreach my $line (@lines) {
1138 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
1139 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
1141 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
1143 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1300 foreach my $line (split(/\n/, $lines)) {
1301 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1562 my ($line) = @_;
1565 $line =~ s/^.//;
1566 $line = expand_tabs($line);
1569 my ($white) = ($line =~ /^(\s*)/);
1571 return (length($line), length($white));
1586 my ($line) = @_;
1596 $res = substr($line, 0, 1);
1598 for ($off = 1; $off < length($line); $off++) {
1599 $c = substr($line, $off, 1);
1603 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1610 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1616 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1679 my ($line, $rawline) = @_;
1681 return "" if (!defined($line) || !defined($rawline));
1682 return "" if ($line !~ m/($String)/g);
1688 my $line = $linenr - 1;
1711 for (; $remain > 0; $line++) {
1712 last if (!defined $lines[$line]);
1713 next if ($lines[$line] =~ /^-/);
1716 $blk .= $lines[$line] . "\n";
1718 $line++;
1804 $line++;
1817 $line, $remain + 1, $off - $loff + 1, $level);
1894 my $line;
1903 for ($line = $start; $remain > 0; $line++) {
1904 next if ($rawlines[$line] =~ /^-/);
1907 $blk .= $rawlines[$line];
1910 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1912 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1914 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1918 foreach my $c (split(//, $lines[$line])) {
1934 push(@res, $rawlines[$line]);
1991 my $line = $rawlines[$linenr - 1];
1993 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1996 if ($line =~ m@/\*@) {
2002 $current_comment .= $line . "\n" if ($in_comment);
2003 if ($line =~ m@\*/@) {
2027 my $line;
2029 $line = $rawlines[$offset++];
2030 next if (defined($line) && $line =~ /^-/);
2034 return $line;
2289 my ($possible, $line) = @_;
2309 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2320 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2326 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2331 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2428 my $line = $old_line; #don't modify the array
2429 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2431 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2433 fixup_current_range(\$line, $delta_offset, 0);
2450 push(@lines, $line);
2461 my ($linenr, $line) = @_;
2465 LINE => $line,
2471 my ($linenr, $line) = @_;
2475 LINE => $line,
2588 my ($line) = @_;
2592 my $opens = $line =~ tr/\(/\(/;
2593 my $closes = $line =~ tr/\)/\)/;
2601 my $len = length($line);
2604 my $string = substr($line, $pos);
2607 } elsif (substr($line, $pos, 1) eq '(') {
2614 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2618 my ($line, $rawline) = @_;
2621 for my $i (0 .. (length($line) - 1)) {
2622 if (substr($line, $i, 1) eq "$;") {
2717 my $line;
2720 $line = $rawline;
2777 $line = sanitise_line($rawline);
2779 push(@lines, $line);
2782 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2790 if ($setup_docs && $line =~ /^\+/) {
2791 push(@setup_docs, $line);
2800 foreach my $line (@lines) {
2803 my $sline = $line; #copy of $line
2807 my $raw_comment = get_raw_comment($line, $rawline);
2811 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2812 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2813 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2819 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2846 } elsif ($line =~ /^( |\+|$)/) {
2854 ($prevline, $stashline) = ($stashline, $line);
2871 if ($line =~ /^diff --git.*?(\S+)$/) {
2876 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2944 if ($line !~ /^\s*$/) {
2955 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2956 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2957 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2958 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2965 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2975 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2981 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2987 if ($line =~ /^\s*signed-off-by:\s*(.*)/i) {
3026 if ($line =~ /^---$/) {
3033 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
3039 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
3171 my $sig_nospace = $line;
3213 $line =~ /^This reverts commit/) {
3218 $line =~ /((?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller))/) {
3224 $line =~ /^\s*(fixes:?)\s*(?:commit\s*)?([0-9a-f]{5,40})(?:\s*($balanced_parens))?/i) {
3243 my $tag_space = not ($line =~ /^fixes:? [0-9a-f]{5,40} ($balanced_parens)/i);
3264 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
3270 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
3280 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
3281 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
3283 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
3284 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
3285 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
3292 length($line) > 75 &&
3293 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
3295 $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
3297 $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
3307 $line =~ /^\s*$/) {
3313 $line =~ /^\s*(\w+:)\s*http/ && $1 !~ /^$link_tags_search$/) {
3325 $line =~ /^\s*(\w+:)\s*(\S+)/) {
3335 if ($in_commit_log && $line =~ /^#/) {
3354 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
3355 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
3356 (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
3357 …($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,…
3358 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
3359 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
3360 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
3374 my $input = $line;
3375 if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
3416 $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
3427 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
3428 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
3429 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
3439 ($line =~ /^new file mode\s*\d+\s*$/) &&
3446 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
3453 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
3491 while ($line =~ m{(?:^|\s)(/\S*)}g) {
3505 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
3526 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
3591 next if (!$hunk_line || $line =~ /^-/);
3594 if ($line =~ /^\+.*\015/) {
3631 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3717 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3718 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3748 $line =~ /^\+\s*(phy-mode|phy-connection-type)\s*=\s*"/ &&
3751 my $mode = get_quoted_string($line, $rawline);
3824 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3845 if ($line =~ /^\+/ && $length > $max_line_length) {
3852 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3853 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3858 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3859 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3863 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3864 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3874 } elsif ($line =~ /($;[\s$;]*)$/ &&
3875 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3880 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3894 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3904 $line =~ /^\+\s*(?:[A-Z]+_)?SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) {
3986 $line =~ /^(\+| )([ \t]*)/;
3999 $fix && $line =~ /^\+/) {
4014 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
4045 $line =~ /^\+[ \t]*$;/ && #leading comment
4070 $line =~ /^\+/ &&
4071 !($line =~ /^\+\s*$/ ||
4072 $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param|ALLOW_ERROR_INJECTION)/ ||
4073 $line =~ /^\+\s*MODULE_/i ||
4074 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
4075 $line =~ /^\+[a-z_]*init/ ||
4076 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
4077 $line =~ /^\+\s*DECLARE/ ||
4078 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
4079 $line =~ /^\+\s*__setup/)) {
4089 $line =~ /^\+\s*$/ &&
4151 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
4164 if ($line =~ /^\+.*([\[\(])\s*$/) {
4215 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
4302 if ($line=~/\bswitch\s*\(.*\)/) {
4325 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
4330 if ($line =~ /^\+\t{6,}/) {
4371 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
4472 my $opline = $line; $opline =~ s/^./ /;
4485 next if ($line =~ /^[^\+]/);
4490 if ($line =~ /^\+\s*(?:$Declare)?([A-Za-z_][A-Za-z\d_]*)\s*=/) {
4492 …if ($line =~ /^\+\s*(?:$Declare)?$var\s*=\s*(?:$var|\*\s*\(?\s*&\s*\(?\s*$var\s*\)?\s*\)?)\s*[;,]/…
4500 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
4503 $line =~ /^.\s*($Lval)/;
4511 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
4536 if ($line =~ /^.\s*$Declare\s*$/) {
4539 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
4547 if ($line =~ /^.\s*$Modifier\s*$/) {
4550 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
4558 if ($line =~ /^.\s*{/ &&
4562 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4568 $fixedline = $line;
4592 if ($line =~ m{//}) {
4596 my $line = $fixed[$fixlinenr];
4597 if ($line =~ /\/\/(.*)$/) {
4604 $line =~ s@//.*@@;
4641 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/)) {
4652 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/ &&
4661 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4698 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4705 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4714 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4745 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4752 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4754 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4765 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4775 if ($line =~ /\btypedef\s/ &&
4776 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4777 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4778 $line !~ /\b$typeTypedefs\b/ &&
4779 $line !~ /\b__bitwise\b/) {
4786 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4811 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4841 …if ($line =~ /\b(?!AA_|BUILD_|IDA_|KVM_|RWLOCK_|snd_|SPIN_)(?:[a-zA-Z_]*_)?BUG(?:_ON)?(?:_[A-Z_]+)…
4849 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4855 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4861 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4867 if ($line =~ /\b(printk(_once|_ratelimited)?)\s*\(\s*KERN_([A-Z]+)/) {
4883 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4893 if ($line =~ /\b(trace_printk|trace_puts|ftrace_vprintk)\s*\(/) {
4901 if ($line =~ /\bENOSYS\b/) {
4909 if (!$file && $line =~ /\bENOTSUPP\b/) {
4940 if ($line =~ /^.\s*{/ &&
4944 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4958 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4970 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
5041 while ($line =~ /(.*?\s)\[/g) {
5056 while ($line =~ /($Ident)\s+\(/g) {
5058 my $ctx_before = substr($line, 0, $-[1]);
5091 if (!($line=~/\#\s*include/)) {
5402 if ($line =~ /^\+.*\S\s+;\s*$/) {
5412 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
5434 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
5435 $line =~ /\b(?:else|do)\{/) {
5453 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
5463 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
5471 if ($line =~ /\s\]/) {
5481 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
5482 $line !~ /for\s*\(\s+;/) {
5490 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
5491 $line !~ /for\s*\(.*;\s+\)/ &&
5492 $line !~ /:\s+\)/) {
5504 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
5516 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
5610 $line =~ /\bif\s*((?:\(\s*){2,})/) {
5614 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5627 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5661 if ($line =~ /\b(if|while|for|switch)\(/) {
5672 if ($line =~ /do\s*(?!{)/) {
5695 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5764 if ($line =~ /
5780 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5789 if ($line =~ /}\s*if\b/) {
5795 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5796 $line !~ /\G(?:
5807 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5811 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5825 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5837 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5851 while ($line =~ m{($Constant|$Lval)}g) {
5890 if ($line =~ /\#\s*define.*\\\s+$/) {
5924 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
6083 $line =~ s/(\w+)/$maybe_linker_symbol{$1}++/ge;
6087 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
6088 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
6089 $line =~ /^\+.*\\$/) {
6100 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
6140 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
6203 $line =~ /\b(if|while|for|else)\b/) {
6207 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
6260 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
6277 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
6286 if ($line =~ /^\+\s*$String/ &&
6294 my $extracted_string = get_quoted_string($line, $rawline);
6325 if ($line =~ /^\+.*$String/ &&
6327 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
6328 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
6355 if ($line =~ /$String[A-Z_]/ ||
6356 ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) {
6360 while ($line =~ /($String)/g) {
6369 if ($line =~ /$String\s*[Lu]?"/) {
6373 while ($line =~ /($String)(?=\s*")/g) {
6383 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
6412 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
6418 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
6427 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
6457 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
6475 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
6476 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
6486 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
6493 $line =~ /\b$logFunctions\s*\(/ &&
6515 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
6523 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
6536 if ($line =~ /(\b$InitAttribute\b)/) {
6538 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
6554 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
6568 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
6583 if ($line =~ /\b__read_mostly\b/ &&
6584 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
6594 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
6606 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
6620 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
6628 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
6634 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
6647 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
6658 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
6659 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
6687 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
6698 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
6699 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
6705 if ($line =~ /\bwaitqueue_active\s*\(/) {
6713 if ($line =~ /\bdata_race\s*\(/) {
6721 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6727 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6732 if ($line =~ /\b$Storage\b/ &&
6733 $line !~ /^.\s*$Storage/ &&
6734 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6742 if ($line =~ /\b$Type\s+$Inline\b/ ||
6743 $line =~ /\b$Inline\s+$Storage\b/) {
6750 $line =~ /\b(__inline__|__inline)\b/) {
6826 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6827 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6828 $line =~ /\b__weak\b/)) {
6836 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6853 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6873 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6879 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6888 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6895 my $fmt = get_quoted_string($line, $rawline);
7023 if ($line =~ /\bstrcpy\s*\(/) {
7029 if ($line =~ /\bstrlcpy\s*\(/) {
7035 if ($line =~ /\bstrncpy\s*\(/) {
7041 if ($line =~ /\bethtool_sprintf\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) {
7102 $line =~ /\bsscanf\b/ &&
7116 $line =~ /\bsscanf\b/) {
7133 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
7233 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
7241 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
7279 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
7286 if ($line =~ /\b((?:devm_)?((?:k|kv)?(calloc|malloc_array)(?:_node)?))\s*\(\s*sizeof\b/) {
7292 if ($line =~ /;\s*;\s*$/) {
7302 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
7319 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:…
7362 if ($line =~ /\b__FUNCTION__\b/) {
7371 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
7377 if ($line =~ /\byield\s*\(\s*\)/) {
7383 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
7410 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
7416 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
7422 if ($line =~ /^.\s*__initcall\s*\(/) {
7428 if ($line =~ /\bspin_is_locked\(/) {
7434 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
7444 $line !~ /\bconst\b/ &&
7445 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
7453 if ($line =~ /\bNR_CPUS\b/ &&
7454 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
7455 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
7456 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
7457 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
7458 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/ &&
7459 $line !~ /^.\s*\.\w+\s*=\s*.*\bNR_CPUS\b/)
7466 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
7473 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
7479 if ($line =~ /\breturn\s+sysfs_emit\s*\(\s*$FuncArg\s*,\s*($String)/ &&
7500 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
7506 if ($line =~ /\bin_atomic\s*\(/) {
7533 if ($line =~ /\b($rcu_trace_funcs)\s*\(/) {
7541 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
7542 $line =~ /__lockdep_no_validate__\s*\)/ ) {
7551 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
7552 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
7622 $line =~ /$mode_perms_search/) {
7655 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
7666 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
7667 my $extracted_string = get_quoted_string($line, $rawline);
7691 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {
7697 if (defined $stat && $line =~ /struct\s+$dev_id_types\s+\w+\s*\[\s*\]\s*=\s*\{/) {