Lines Matching refs:line
182 my $line = $_;
184 $line =~ s/\s*\n?$//g;
185 $line =~ s/^\s*//g;
186 $line =~ s/\s+/ /g;
188 next if ($line =~ m/^\s*#/);
189 next if ($line =~ m/^\s*$/);
191 my @words = split(" ", $line);
707 my $line = $_;
709 $line =~ s/\s*\n?$//g;
710 $line =~ s/^\s*//g;
712 next if ($line =~ m/^\s*#/);
713 next if ($line =~ m/^\s*$/);
715 my ($suspect, $fix) = split(/\|\|/, $line);
727 my $line = $_;
729 $line =~ s/\s*\n?$//g;
730 $line =~ s/^\s*//g;
732 next if ($line =~ m/^\s*#/);
733 next if ($line =~ m/^\s*$/);
734 next if ($line =~ m/, disabled/i);
736 $line =~ s/,.*$//;
738 my ($suspect, $fix) = split(/->/, $line);
755 my $line = $_;
757 $line =~ s/\s*\n?$//g;
758 $line =~ s/^\s*//g;
760 next if ($line =~ m/^\s*#/);
761 next if ($line =~ m/^\s*$/);
762 if ($line =~ /\s/) {
763 print("$file: '$line' invalid - ignored\n");
768 $$wordsRef .= $line;
884 foreach my $line (@lines) {
885 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
886 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
888 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
890 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1045 foreach my $line (split(/\n/, $lines)) {
1046 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1301 my ($line) = @_;
1304 $line =~ s/^.//;
1305 $line = expand_tabs($line);
1308 my ($white) = ($line =~ /^(\s*)/);
1310 return (length($line), length($white));
1325 my ($line) = @_;
1335 $res = substr($line, 0, 1);
1337 for ($off = 1; $off < length($line); $off++) {
1338 $c = substr($line, $off, 1);
1342 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1349 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1355 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1418 my ($line, $rawline) = @_;
1420 return "" if (!defined($line) || !defined($rawline));
1421 return "" if ($line !~ m/($String)/g);
1427 my $line = $linenr - 1;
1450 for (; $remain > 0; $line++) {
1451 last if (!defined $lines[$line]);
1452 next if ($lines[$line] =~ /^-/);
1455 $blk .= $lines[$line] . "\n";
1457 $line++;
1543 $line++;
1556 $line, $remain + 1, $off - $loff + 1, $level);
1633 my $line;
1642 for ($line = $start; $remain > 0; $line++) {
1643 next if ($rawlines[$line] =~ /^-/);
1646 $blk .= $rawlines[$line];
1649 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1651 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1653 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1657 foreach my $c (split(//, $lines[$line])) {
1673 push(@res, $rawlines[$line]);
1730 my $line = $rawlines[$linenr - 1];
1732 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1735 if ($line =~ m@/\*@) {
1741 $current_comment .= $line . "\n" if ($in_comment);
1742 if ($line =~ m@\*/@) {
1766 my $line;
1768 $line = $rawlines[$offset++];
1769 next if (defined($line) && $line =~ /^-/);
1773 return $line;
2028 my ($possible, $line) = @_;
2048 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2059 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2065 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2070 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2158 my $line = $old_line; #don't modify the array
2159 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2161 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2163 fixup_current_range(\$line, $delta_offset, 0);
2180 push(@lines, $line);
2191 my ($linenr, $line) = @_;
2195 LINE => $line,
2201 my ($linenr, $line) = @_;
2205 LINE => $line,
2318 my ($line) = @_;
2322 my $opens = $line =~ tr/\(/\(/;
2323 my $closes = $line =~ tr/\)/\)/;
2331 my $len = length($line);
2334 my $string = substr($line, $pos);
2337 } elsif (substr($line, $pos, 1) eq '(') {
2344 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2348 my ($line, $rawline) = @_;
2351 for my $i (0 .. (length($line) - 1)) {
2352 if (substr($line, $i, 1) eq "$;") {
2433 my $line;
2436 $line = $rawline;
2493 $line = sanitise_line($rawline);
2495 push(@lines, $line);
2498 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2506 if ($setup_docs && $line =~ /^\+/) {
2507 push(@setup_docs, $line);
2516 foreach my $line (@lines) {
2519 my $sline = $line; #copy of $line
2523 my $raw_comment = get_raw_comment($line, $rawline);
2527 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2528 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2529 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2535 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2562 } elsif ($line =~ /^( |\+|$)/) {
2570 ($prevline, $stashline) = ($stashline, $line);
2587 if ($line =~ /^diff --git.*?(\S+)$/) {
2592 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2660 if ($line !~ /^\s*$/) {
2671 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2672 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2673 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2674 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2681 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2691 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2697 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2703 if ($line =~ /^\s*signed-off-by:\s*(.*)/i) {
2742 if ($line =~ /^---$/) {
2749 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
2755 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2810 my $sig_nospace = $line;
2841 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2847 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
2854 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2855 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2857 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
2858 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
2859 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
2866 length($line) > 75 &&
2867 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2869 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2871 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2881 $line =~ /^\s*$/) {
2887 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
2888 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2889 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2890 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2891 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2892 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2905 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2908 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2912 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2913 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2914 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2915 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2916 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2919 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2924 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2927 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2946 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2947 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2948 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2958 ($line =~ /^new file mode\s*\d+\s*$/) &&
2965 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2972 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
3010 while ($line =~ m{(?:^|\s)(/\S*)}g) {
3024 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
3041 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
3088 next if (!$hunk_line || $line =~ /^-/);
3091 if ($line =~ /^\+.*\015/) {
3128 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3214 $line =~ /^\+\s*\bboolean\b/) {
3220 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3235 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3236 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3325 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3346 if ($line =~ /^\+/ && $length > $max_line_length) {
3353 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3354 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3359 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3360 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3364 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3365 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3375 } elsif ($line =~ /($;[\s$;]*)$/ &&
3376 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3381 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3395 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3463 $line =~ /^(\+| )([ \t]*)/;
3476 $fix && $line =~ /^\+/) {
3491 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3532 $line =~ /^\+[ \t]*$;/ && #leading comment
3557 $line =~ /^\+/ &&
3558 !($line =~ /^\+\s*$/ ||
3559 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3560 $line =~ /^\+\s*MODULE_/i ||
3561 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3562 $line =~ /^\+[a-z_]*init/ ||
3563 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3564 $line =~ /^\+\s*DECLARE/ ||
3565 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
3566 $line =~ /^\+\s*__setup/)) {
3576 $line =~ /^\+\s*$/ &&
3633 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
3646 if ($line =~ /^\+.*([\[\(])\s*$/) {
3693 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3780 if ($line=~/\bswitch\s*\(.*\)/) {
3803 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
3808 if ($line =~ /^\+\t{6,}/) {
3849 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
3950 my $opline = $line; $opline =~ s/^./ /;
3963 next if ($line =~ /^[^\+]/);
3968 if ($line =~ /^\+\s*(?:$Declare)?([A-Za-z_][A-Za-z\d_]*)\s*=/) {
3970 …if ($line =~ /^\+\s*(?:$Declare)?$var\s*=\s*(?:$var|\*\s*\(?\s*&\s*\(?\s*$var\s*\)?\s*\)?)\s*[;,]/…
3978 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3981 $line =~ /^.\s*($Lval)/;
3989 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
4014 if ($line =~ /^.\s*$Declare\s*$/) {
4017 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
4025 if ($line =~ /^.\s*$Modifier\s*$/) {
4028 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
4036 if ($line =~ /^.\s*{/ &&
4040 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4046 $fixedline = $line;
4070 if ($line =~ m{//}) {
4074 my $line = $fixed[$fixlinenr];
4075 if ($line =~ /\/\/(.*)$/) {
4082 $line =~ s@//.*@@;
4119 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
4120 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
4131 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
4139 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4176 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4183 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4192 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4211 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4218 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4220 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4231 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4241 if ($line =~ /\btypedef\s/ &&
4242 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4243 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4244 $line !~ /\b$typeTypedefs\b/ &&
4245 $line !~ /\b__bitwise\b/) {
4252 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4277 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4307 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
4315 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4321 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4327 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4332 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
4342 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4352 if ($line =~ /\b(trace_printk|trace_puts|ftrace_vprintk)\s*\(/) {
4360 if ($line =~ /\bENOSYS\b/) {
4368 if (!$file && $line =~ /\bENOTSUPP\b/) {
4399 if ($line =~ /^.\s*{/ &&
4403 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4417 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4429 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4500 while ($line =~ /(.*?\s)\[/g) {
4515 while ($line =~ /($Ident)\s+\(/g) {
4517 my $ctx_before = substr($line, 0, $-[1]);
4550 if (!($line=~/\#\s*include/)) {
4861 if ($line =~ /^\+.*\S\s+;\s*$/) {
4871 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4893 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4894 $line =~ /\b(?:else|do)\{/) {
4912 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
4922 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4930 if ($line =~ /\s\]/) {
4940 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4941 $line !~ /for\s*\(\s+;/) {
4949 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4950 $line !~ /for\s*\(.*;\s+\)/ &&
4951 $line !~ /:\s+\)/) {
4963 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4975 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
5013 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
5014 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
5065 $line =~ /\bif\s*((?:\(\s*){2,})/) {
5069 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5082 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5116 if ($line =~ /\b(if|while|for|switch)\(/) {
5127 if ($line =~ /do\s*(?!{)/) {
5150 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5205 if ($line =~ /
5221 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5230 if ($line =~ /}\s*if\b/) {
5236 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5237 $line !~ /\G(?:
5248 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5252 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5266 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5278 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5292 while ($line =~ m{($Constant|$Lval)}g) {
5325 if ($line =~ /\#\s*define.*\\\s+$/) {
5359 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
5509 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
5510 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
5511 $line =~ /^\+.*\\$/) {
5522 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5562 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5625 $line =~ /\b(if|while|for|else)\b/) {
5629 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
5682 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5699 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5708 if ($line =~ /^\+\s*$String/ &&
5716 my $extracted_string = get_quoted_string($line, $rawline);
5747 if ($line =~ /^\+.*$String/ &&
5749 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5750 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5766 if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
5770 while ($line =~ /($String)/g) {
5779 if ($line =~ /$String\s*"/) {
5783 while ($line =~ /($String)(?=\s*")/g) {
5793 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5822 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5828 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
5837 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5867 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5885 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5886 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5896 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5903 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5911 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5924 if ($line =~ /(\b$InitAttribute\b)/) {
5926 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5942 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5956 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5971 if ($line =~ /\b__read_mostly\b/ &&
5972 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5982 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5994 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
6008 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
6016 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
6022 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
6035 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
6046 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
6047 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
6075 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
6086 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
6087 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
6093 if ($line =~ /\bwaitqueue_active\s*\(/) {
6101 if ($line =~ /\bdata_race\s*\(/) {
6109 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6115 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6120 if ($line =~ /\b$Storage\b/ &&
6121 $line !~ /^.\s*$Storage/ &&
6122 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6130 if ($line =~ /\b$Type\s+$Inline\b/ ||
6131 $line =~ /\b$Inline\s+$Storage\b/) {
6138 $line =~ /\b(__inline__|__inline)\b/) {
6149 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
6156 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
6163 $line =~ /\b__attribute__\s*\(\s*\(.*_*section_*\s*\(\s*("[^"]*")/) {
6175 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
6186 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
6196 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6197 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6198 $line =~ /\b__weak\b/)) {
6206 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6223 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6243 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6249 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6258 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6265 my $fmt = get_quoted_string($line, $rawline);
6429 $line =~ /\bsscanf\b/ &&
6443 $line =~ /\bsscanf\b/) {
6460 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
6545 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
6553 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
6589 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
6596 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6602 if ($line =~ /;\s*;\s*$/) {
6612 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6629 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:…
6672 if ($line =~ /\b__FUNCTION__\b/) {
6681 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6687 if ($line =~ /\byield\s*\(\s*\)/) {
6693 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6720 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6726 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6732 if ($line =~ /^.\s*__initcall\s*\(/) {
6738 if ($line =~ /\bspin_is_locked\(/) {
6744 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
6754 $line !~ /\bconst\b/ &&
6755 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6762 if ($line =~ /\bNR_CPUS\b/ &&
6763 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6764 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6765 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6766 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6767 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6774 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6781 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6787 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
6793 if ($line =~ /\bin_atomic\s*\(/) {
6804 if ($line =~ /mutex_trylock_recursive/) {
6810 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6811 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6820 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6821 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6891 $line =~ /$mode_perms_search/) {
6924 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
6935 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6936 my $extracted_string = get_quoted_string($line, $rawline);
6953 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {