Lines Matching refs:line
232 my $line = $_;
234 $line =~ s/\s*\n?$//g;
235 $line =~ s/^\s*//g;
236 $line =~ s/\s+/ /g;
238 next if ($line =~ m/^\s*#/);
239 next if ($line =~ m/^\s*$/);
241 my @words = split(" ", $line);
261 my $line = $_;
262 $line =~ s/\s+$//;
264 if ($line =~ /^\s*\*\*(.+)\*\*$/) {
272 if ($line =~ /^(?:\s{4,}|$)/) {
273 $line =~ s/^\s{4}//;
274 $desc .= $line;
944 my $line = $_;
946 $line =~ s/\s*\n?$//g;
947 $line =~ s/^\s*//g;
949 next if ($line =~ m/^\s*#/);
950 next if ($line =~ m/^\s*$/);
952 my ($suspect, $fix) = split(/\|\|/, $line);
964 my $line = $_;
966 $line =~ s/\s*\n?$//g;
967 $line =~ s/^\s*//g;
969 next if ($line =~ m/^\s*#/);
970 next if ($line =~ m/^\s*$/);
971 next if ($line =~ m/, disabled/i);
973 $line =~ s/,.*$//;
975 my ($suspect, $fix) = split(/->/, $line);
992 my $line = $_;
994 $line =~ s/\s*\n?$//g;
995 $line =~ s/^\s*//g;
997 next if ($line =~ m/^\s*#/);
998 next if ($line =~ m/^\s*$/);
999 if ($line =~ /\s/) {
1000 print("$file: '$line' invalid - ignored\n");
1005 $$wordsRef .= $line;
1129 foreach my $line (@lines) {
1130 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
1131 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
1133 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
1135 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1292 foreach my $line (split(/\n/, $lines)) {
1293 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1554 my ($line) = @_;
1557 $line =~ s/^.//;
1558 $line = expand_tabs($line);
1561 my ($white) = ($line =~ /^(\s*)/);
1563 return (length($line), length($white));
1578 my ($line) = @_;
1588 $res = substr($line, 0, 1);
1590 for ($off = 1; $off < length($line); $off++) {
1591 $c = substr($line, $off, 1);
1595 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1602 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1608 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1671 my ($line, $rawline) = @_;
1673 return "" if (!defined($line) || !defined($rawline));
1674 return "" if ($line !~ m/($String)/g);
1680 my $line = $linenr - 1;
1703 for (; $remain > 0; $line++) {
1704 last if (!defined $lines[$line]);
1705 next if ($lines[$line] =~ /^-/);
1708 $blk .= $lines[$line] . "\n";
1710 $line++;
1796 $line++;
1809 $line, $remain + 1, $off - $loff + 1, $level);
1886 my $line;
1895 for ($line = $start; $remain > 0; $line++) {
1896 next if ($rawlines[$line] =~ /^-/);
1899 $blk .= $rawlines[$line];
1902 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1904 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1906 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1910 foreach my $c (split(//, $lines[$line])) {
1926 push(@res, $rawlines[$line]);
1983 my $line = $rawlines[$linenr - 1];
1985 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1988 if ($line =~ m@/\*@) {
1994 $current_comment .= $line . "\n" if ($in_comment);
1995 if ($line =~ m@\*/@) {
2019 my $line;
2021 $line = $rawlines[$offset++];
2022 next if (defined($line) && $line =~ /^-/);
2026 return $line;
2281 my ($possible, $line) = @_;
2301 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2312 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2318 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2323 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2420 my $line = $old_line; #don't modify the array
2421 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2423 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2425 fixup_current_range(\$line, $delta_offset, 0);
2442 push(@lines, $line);
2453 my ($linenr, $line) = @_;
2457 LINE => $line,
2463 my ($linenr, $line) = @_;
2467 LINE => $line,
2580 my ($line) = @_;
2584 my $opens = $line =~ tr/\(/\(/;
2585 my $closes = $line =~ tr/\)/\)/;
2593 my $len = length($line);
2596 my $string = substr($line, $pos);
2599 } elsif (substr($line, $pos, 1) eq '(') {
2606 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2610 my ($line, $rawline) = @_;
2613 for my $i (0 .. (length($line) - 1)) {
2614 if (substr($line, $i, 1) eq "$;") {
2709 my $line;
2712 $line = $rawline;
2769 $line = sanitise_line($rawline);
2771 push(@lines, $line);
2774 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2782 if ($setup_docs && $line =~ /^\+/) {
2783 push(@setup_docs, $line);
2792 foreach my $line (@lines) {
2795 my $sline = $line; #copy of $line
2799 my $raw_comment = get_raw_comment($line, $rawline);
2803 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2804 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2805 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2811 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2838 } elsif ($line =~ /^( |\+|$)/) {
2846 ($prevline, $stashline) = ($stashline, $line);
2863 if ($line =~ /^diff --git.*?(\S+)$/) {
2868 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2936 if ($line !~ /^\s*$/) {
2947 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2948 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2949 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2950 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2957 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2967 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2973 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2979 if ($line =~ /^\s*signed-off-by:\s*(.*)/i) {
3018 if ($line =~ /^---$/) {
3025 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
3031 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
3163 my $sig_nospace = $line;
3205 $line =~ /^This reverts commit/) {
3210 $line =~ /((?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller))/) {
3216 $line =~ /^\s*fixes:?\s*(?:commit\s*)?[0-9a-f]{5,}\b/i) {
3227 if ($line =~ /(\s*fixes:?)\s+([0-9a-f]{5,})\s+($balanced_parens)/i) {
3233 $tag_space = 0 if ($line =~ /^fixes:? [0-9a-f]{5,} ($balanced_parens)/i);
3261 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
3267 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
3277 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
3278 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
3280 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
3281 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
3282 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
3289 length($line) > 75 &&
3290 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
3292 $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
3294 $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
3304 $line =~ /^\s*$/) {
3310 $line =~ /^\s*(\w+:)\s*http/ && $1 !~ /^$link_tags_search$/) {
3322 $line =~ /^\s*(\w+:)\s*(\S+)/) {
3332 if ($in_commit_log && $line =~ /^#/) {
3351 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
3352 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
3353 (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
3354 …($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,…
3355 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
3356 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
3357 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
3371 my $input = $line;
3372 if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
3413 $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
3424 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
3425 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
3426 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
3436 ($line =~ /^new file mode\s*\d+\s*$/) &&
3443 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
3450 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
3488 while ($line =~ m{(?:^|\s)(/\S*)}g) {
3502 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
3522 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
3587 next if (!$hunk_line || $line =~ /^-/);
3590 if ($line =~ /^\+.*\015/) {
3627 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3712 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3727 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3728 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3822 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3843 if ($line =~ /^\+/ && $length > $max_line_length) {
3850 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3851 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3856 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3857 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3861 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3862 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3872 } elsif ($line =~ /($;[\s$;]*)$/ &&
3873 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3878 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3892 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3902 $line =~ /^\+\s*(?:[A-Z]+_)?SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) {
3984 $line =~ /^(\+| )([ \t]*)/;
3997 $fix && $line =~ /^\+/) {
4012 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
4053 $line =~ /^\+[ \t]*$;/ && #leading comment
4078 $line =~ /^\+/ &&
4079 !($line =~ /^\+\s*$/ ||
4080 $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param|ALLOW_ERROR_INJECTION)/ ||
4081 $line =~ /^\+\s*MODULE_/i ||
4082 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
4083 $line =~ /^\+[a-z_]*init/ ||
4084 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
4085 $line =~ /^\+\s*DECLARE/ ||
4086 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
4087 $line =~ /^\+\s*__setup/)) {
4097 $line =~ /^\+\s*$/ &&
4159 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
4172 if ($line =~ /^\+.*([\[\(])\s*$/) {
4223 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
4310 if ($line=~/\bswitch\s*\(.*\)/) {
4333 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
4338 if ($line =~ /^\+\t{6,}/) {
4379 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
4480 my $opline = $line; $opline =~ s/^./ /;
4493 next if ($line =~ /^[^\+]/);
4498 if ($line =~ /^\+\s*(?:$Declare)?([A-Za-z_][A-Za-z\d_]*)\s*=/) {
4500 …if ($line =~ /^\+\s*(?:$Declare)?$var\s*=\s*(?:$var|\*\s*\(?\s*&\s*\(?\s*$var\s*\)?\s*\)?)\s*[;,]/…
4508 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
4511 $line =~ /^.\s*($Lval)/;
4519 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
4544 if ($line =~ /^.\s*$Declare\s*$/) {
4547 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
4555 if ($line =~ /^.\s*$Modifier\s*$/) {
4558 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
4566 if ($line =~ /^.\s*{/ &&
4570 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4576 $fixedline = $line;
4600 if ($line =~ m{//}) {
4604 my $line = $fixed[$fixlinenr];
4605 if ($line =~ /\/\/(.*)$/) {
4612 $line =~ s@//.*@@;
4649 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/)) {
4660 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/ &&
4669 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4706 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4713 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4722 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4753 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4760 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4762 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4773 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4783 if ($line =~ /\btypedef\s/ &&
4784 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4785 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4786 $line !~ /\b$typeTypedefs\b/ &&
4787 $line !~ /\b__bitwise\b/) {
4794 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4819 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4849 …if ($line =~ /\b(?!AA_|BUILD_|DCCP_|IDA_|KVM_|RWLOCK_|snd_|SPIN_)(?:[a-zA-Z_]*_)?BUG(?:_ON)?(?:_[A…
4857 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4863 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4869 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4875 if ($line =~ /\b(printk(_once|_ratelimited)?)\s*\(\s*KERN_([A-Z]+)/) {
4891 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4901 if ($line =~ /\b(trace_printk|trace_puts|ftrace_vprintk)\s*\(/) {
4909 if ($line =~ /\bENOSYS\b/) {
4917 if (!$file && $line =~ /\bENOTSUPP\b/) {
4948 if ($line =~ /^.\s*{/ &&
4952 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4966 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4978 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
5049 while ($line =~ /(.*?\s)\[/g) {
5064 while ($line =~ /($Ident)\s+\(/g) {
5066 my $ctx_before = substr($line, 0, $-[1]);
5099 if (!($line=~/\#\s*include/)) {
5410 if ($line =~ /^\+.*\S\s+;\s*$/) {
5420 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
5442 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
5443 $line =~ /\b(?:else|do)\{/) {
5461 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
5471 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
5479 if ($line =~ /\s\]/) {
5489 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
5490 $line !~ /for\s*\(\s+;/) {
5498 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
5499 $line !~ /for\s*\(.*;\s+\)/ &&
5500 $line !~ /:\s+\)/) {
5512 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
5524 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
5618 $line =~ /\bif\s*((?:\(\s*){2,})/) {
5622 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5635 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5669 if ($line =~ /\b(if|while|for|switch)\(/) {
5680 if ($line =~ /do\s*(?!{)/) {
5703 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5772 if ($line =~ /
5788 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5797 if ($line =~ /}\s*if\b/) {
5803 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5804 $line !~ /\G(?:
5815 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5819 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5833 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5845 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5859 while ($line =~ m{($Constant|$Lval)}g) {
5896 if ($line =~ /\#\s*define.*\\\s+$/) {
5930 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
6086 $line =~ s/(\w+)/$maybe_linker_symbol{$1}++/ge;
6090 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
6091 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
6092 $line =~ /^\+.*\\$/) {
6103 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
6143 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
6206 $line =~ /\b(if|while|for|else)\b/) {
6210 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
6263 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
6280 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
6289 if ($line =~ /^\+\s*$String/ &&
6297 my $extracted_string = get_quoted_string($line, $rawline);
6328 if ($line =~ /^\+.*$String/ &&
6330 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
6331 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
6358 if ($line =~ /$String[A-Z_]/ ||
6359 ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) {
6363 while ($line =~ /($String)/g) {
6372 if ($line =~ /$String\s*[Lu]?"/) {
6376 while ($line =~ /($String)(?=\s*")/g) {
6386 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
6415 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
6421 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
6430 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
6460 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
6478 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
6479 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
6489 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
6496 $line =~ /\b$logFunctions\s*\(/ &&
6518 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
6526 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
6539 if ($line =~ /(\b$InitAttribute\b)/) {
6541 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
6557 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
6571 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
6586 if ($line =~ /\b__read_mostly\b/ &&
6587 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
6597 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
6609 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
6623 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
6631 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
6637 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
6650 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
6661 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
6662 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
6690 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
6701 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
6702 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
6708 if ($line =~ /\bwaitqueue_active\s*\(/) {
6716 if ($line =~ /\bdata_race\s*\(/) {
6724 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6730 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6735 if ($line =~ /\b$Storage\b/ &&
6736 $line !~ /^.\s*$Storage/ &&
6737 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6745 if ($line =~ /\b$Type\s+$Inline\b/ ||
6746 $line =~ /\b$Inline\s+$Storage\b/) {
6753 $line =~ /\b(__inline__|__inline)\b/) {
6829 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6830 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6831 $line =~ /\b__weak\b/)) {
6839 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6856 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6876 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6882 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6891 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6898 my $fmt = get_quoted_string($line, $rawline);
7026 if ($line =~ /\bstrcpy\s*\(/) {
7032 if ($line =~ /\bstrlcpy\s*\(/) {
7038 if ($line =~ /\bstrncpy\s*\(/) {
7044 if ($line =~ /\bethtool_sprintf\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) {
7105 $line =~ /\bsscanf\b/ &&
7119 $line =~ /\bsscanf\b/) {
7136 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
7236 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
7244 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
7282 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
7289 if ($line =~ /\b((?:devm_)?((?:k|kv)?(calloc|malloc_array)(?:_node)?))\s*\(\s*sizeof\b/) {
7295 if ($line =~ /;\s*;\s*$/) {
7305 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
7322 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:…
7365 if ($line =~ /\b__FUNCTION__\b/) {
7374 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
7380 if ($line =~ /\byield\s*\(\s*\)/) {
7386 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
7413 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
7419 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
7425 if ($line =~ /^.\s*__initcall\s*\(/) {
7431 if ($line =~ /\bspin_is_locked\(/) {
7437 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
7447 $line !~ /\bconst\b/ &&
7448 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
7456 if ($line =~ /\bNR_CPUS\b/ &&
7457 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
7458 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
7459 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
7460 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
7461 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/ &&
7462 $line !~ /^.\s*\.\w+\s*=\s*.*\bNR_CPUS\b/)
7469 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
7476 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
7482 if ($line =~ /\breturn\s+sysfs_emit\s*\(\s*$FuncArg\s*,\s*($String)/ &&
7503 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
7509 if ($line =~ /\bin_atomic\s*\(/) {
7536 if ($line =~ /\b($rcu_trace_funcs)\s*\(/) {
7544 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
7545 $line =~ /__lockdep_no_validate__\s*\)/ ) {
7554 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
7555 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
7625 $line =~ /$mode_perms_search/) {
7658 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
7669 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
7670 my $extracted_string = get_quoted_string($line, $rawline);
7694 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {