• Home
  • Raw
  • Download

Lines Matching refs:line

173 		my $line = $_;
175 $line =~ s/\s*\n?$//g;
176 $line =~ s/^\s*//g;
177 $line =~ s/\s+/ /g;
179 next if ($line =~ m/^\s*#/);
180 next if ($line =~ m/^\s*$/);
182 my @words = split(" ", $line);
689 my $line = $_;
691 $line =~ s/\s*\n?$//g;
692 $line =~ s/^\s*//g;
694 next if ($line =~ m/^\s*#/);
695 next if ($line =~ m/^\s*$/);
697 my ($suspect, $fix) = split(/\|\|/, $line);
709 my $line = $_;
711 $line =~ s/\s*\n?$//g;
712 $line =~ s/^\s*//g;
714 next if ($line =~ m/^\s*#/);
715 next if ($line =~ m/^\s*$/);
716 next if ($line =~ m/, disabled/i);
718 $line =~ s/,.*$//;
720 my ($suspect, $fix) = split(/->/, $line);
737 my $line = $_;
739 $line =~ s/\s*\n?$//g;
740 $line =~ s/^\s*//g;
742 next if ($line =~ m/^\s*#/);
743 next if ($line =~ m/^\s*$/);
744 if ($line =~ /\s/) {
745 print("$file: '$line' invalid - ignored\n");
750 $$wordsRef .= $line;
865 foreach my $line (@lines) {
866 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
867 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
869 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
871 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1012 foreach my $line (split(/\n/, $lines)) {
1013 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1233 my ($line) = @_;
1236 $line =~ s/^.//;
1237 $line = expand_tabs($line);
1240 my ($white) = ($line =~ /^(\s*)/);
1242 return (length($line), length($white));
1257 my ($line) = @_;
1267 $res = substr($line, 0, 1);
1269 for ($off = 1; $off < length($line); $off++) {
1270 $c = substr($line, $off, 1);
1274 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1281 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1287 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1350 my ($line, $rawline) = @_;
1352 return "" if (!defined($line) || !defined($rawline));
1353 return "" if ($line !~ m/($String)/g);
1359 my $line = $linenr - 1;
1382 for (; $remain > 0; $line++) {
1383 last if (!defined $lines[$line]);
1384 next if ($lines[$line] =~ /^-/);
1387 $blk .= $lines[$line] . "\n";
1389 $line++;
1475 $line++;
1488 $line, $remain + 1, $off - $loff + 1, $level);
1565 my $line;
1574 for ($line = $start; $remain > 0; $line++) {
1575 next if ($rawlines[$line] =~ /^-/);
1578 $blk .= $rawlines[$line];
1581 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1583 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1585 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1589 foreach my $c (split(//, $lines[$line])) {
1605 push(@res, $rawlines[$line]);
1654 my $line = $rawlines[$linenr - 1];
1656 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1659 if ($line =~ m@/\*@) {
1665 $current_comment .= $line . "\n" if ($in_comment);
1666 if ($line =~ m@\*/@) {
1690 my $line;
1692 $line = $rawlines[$offset++];
1693 next if (defined($line) && $line =~ /^-/);
1697 return $line;
1952 my ($possible, $line) = @_;
1972 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1983 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1989 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1994 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2082 my $line = $old_line; #don't modify the array
2083 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2085 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2087 fixup_current_range(\$line, $delta_offset, 0);
2104 push(@lines, $line);
2115 my ($linenr, $line) = @_;
2119 LINE => $line,
2125 my ($linenr, $line) = @_;
2129 LINE => $line,
2242 my ($line) = @_;
2246 my $opens = $line =~ tr/\(/\(/;
2247 my $closes = $line =~ tr/\)/\)/;
2255 my $len = length($line);
2258 my $string = substr($line, $pos);
2261 } elsif (substr($line, $pos, 1) eq '(') {
2268 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2342 my $line;
2345 $line = $rawline;
2402 $line = sanitise_line($rawline);
2404 push(@lines, $line);
2407 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2415 if ($setup_docs && $line =~ /^\+/) {
2416 push(@setup_docs, $line);
2425 foreach my $line (@lines) {
2428 my $sline = $line; #copy of $line
2435 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2436 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2437 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2443 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2470 } elsif ($line =~ /^( |\+|$)/) {
2478 ($prevline, $stashline) = ($stashline, $line);
2495 if ($line =~ /^diff --git.*?(\S+)$/) {
2500 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2568 if ($line !~ /^\s*$/) {
2579 (($line =~ m@^\s+diff\b.*a/[\w/]+@ &&
2580 $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) ||
2581 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2582 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2589 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2599 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2601 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2606 if ($line =~ /^\s*signed-off-by:/i) {
2610 my $l = $line;
2620 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
2626 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2683 my $sig_nospace = $line;
2714 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2720 if ($in_commit_log && $line =~ /^\s*change-id:/i) {
2727 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2728 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2730 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
2731 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
2732 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
2739 length($line) > 75 &&
2740 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2742 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2744 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2754 $line =~ /^\s*$/) {
2760 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
2761 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2762 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2763 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2764 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2765 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2778 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2781 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2785 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2786 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2787 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2788 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2789 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2792 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2797 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2800 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2819 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2820 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2821 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2830 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2837 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2875 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2889 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
2906 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
2917 next if (!$hunk_line || $line =~ /^-/);
2920 if ($line =~ /^\+.*\015/) {
2957 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3018 $line =~ /^\+\s*\bboolean\b/) {
3024 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3039 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3040 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3112 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3133 if ($line =~ /^\+/ && $length > $max_line_length) {
3140 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3141 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3146 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3147 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3151 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3152 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3162 } elsif ($line =~ /($;[\s$;]*)$/ &&
3163 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3168 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3180 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3248 $line =~ /^(\+| )([ \t]*)/;
3261 $fix && $line =~ /^\+/) {
3276 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3317 $line =~ /^\+[ \t]*$;/ && #leading comment
3342 $line =~ /^\+/ &&
3343 !($line =~ /^\+\s*$/ ||
3344 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3345 $line =~ /^\+\s*MODULE_/i ||
3346 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3347 $line =~ /^\+[a-z_]*init/ ||
3348 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3349 $line =~ /^\+\s*DECLARE/ ||
3350 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
3351 $line =~ /^\+\s*__setup/)) {
3361 $line =~ /^\+\s*$/ &&
3418 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
3431 if ($line =~ /^\+.*([\[\(])\s*$/) {
3478 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3565 if ($line=~/\bswitch\s*\(.*\)/) {
3588 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
3593 if ($line =~ /^\+\t{6,}/) {
3634 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
3735 my $opline = $line; $opline =~ s/^./ /;
3748 next if ($line =~ /^[^\+]/);
3752 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3755 $line =~ /^.\s*($Lval)/;
3763 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3788 if ($line =~ /^.\s*$Declare\s*$/) {
3791 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
3799 if ($line =~ /^.\s*$Modifier\s*$/) {
3802 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
3810 if ($line =~ /^.\s*{/ &&
3814 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3820 $fixedline = $line;
3844 if ($line =~ m{//}) {
3848 my $line = $fixed[$fixlinenr];
3849 if ($line =~ /\/\/(.*)$/) {
3856 $line =~ s@//.*@@;
3893 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
3894 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
3905 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
3913 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
3950 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
3957 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
3966 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
3985 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
3992 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
3994 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4005 if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) {
4015 if ($line =~ /\btypedef\s/ &&
4016 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4017 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4018 $line !~ /\b$typeTypedefs\b/ &&
4019 $line !~ /\b__bitwise\b/) {
4026 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4051 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4081 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
4089 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4095 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4101 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4106 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
4116 if ($line =~ /\bpr_warning\s*\(/) {
4125 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4137 if ($line =~ /\bENOSYS\b/) {
4165 if ($line =~ /^.\s*{/ &&
4169 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4183 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4195 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4266 while ($line =~ /(.*?\s)\[/g) {
4281 while ($line =~ /($Ident)\s+\(/g) {
4283 my $ctx_before = substr($line, 0, $-[1]);
4316 if (!($line=~/\#\s*include/)) {
4627 if ($line =~ /^\+.*\S\s+;\s*$/) {
4637 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4659 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4660 $line =~ /\b(?:else|do)\{/) {
4678 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
4688 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4696 if ($line =~ /\s\]/) {
4706 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4707 $line !~ /for\s*\(\s+;/) {
4715 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4716 $line !~ /for\s*\(.*;\s+\)/ &&
4717 $line !~ /:\s+\)/) {
4729 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4741 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
4779 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
4780 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
4820 $line =~ /\bif\s*((?:\(\s*){2,})/) {
4824 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
4837 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
4871 if ($line =~ /\b(if|while|for|switch)\(/) {
4882 if ($line =~ /do\s*(?!{)/) {
4905 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
4938 if ($line =~ /
4954 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
4963 if ($line =~ /}\s*if\b/) {
4969 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
4970 $line !~ /\G(?:
4981 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
4985 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4999 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5011 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5025 while ($line =~ m{($Constant|$Lval)}g) {
5057 if ($line =~ /\#\s*define.*\\\s+$/) {
5091 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
5240 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
5241 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
5242 $line =~ /^\+.*\\$/) {
5253 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5293 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5356 $line =~ /\b(if|while|for|else)\b/) {
5360 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
5413 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5430 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5439 if ($line =~ /^\+\s*$String/ &&
5447 my $extracted_string = get_quoted_string($line, $rawline);
5478 if ($line =~ /^\+.*$String/ &&
5480 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5481 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5497 if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
5501 while ($line =~ /($String)/g) {
5510 if ($line =~ /$String\s*"/) {
5514 while ($line =~ /($String)(?=\s*")/g) {
5524 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5553 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5559 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
5568 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5598 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5616 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5617 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5627 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5634 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5642 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5655 if ($line =~ /(\b$InitAttribute\b)/) {
5657 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5673 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5687 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5702 if ($line =~ /\b__read_mostly\b/ &&
5703 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5713 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5725 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
5739 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
5747 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
5753 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
5766 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
5777 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
5778 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
5807 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
5818 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
5819 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
5825 if ($line =~ /\bwaitqueue_active\s*\(/) {
5833 if (!$file && $line =~ /\b(smp_|)read_barrier_depends\s*\(/) {
5839 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
5845 if ($line =~ /\b($Type)\s+($Storage)\b/) {
5850 if ($line =~ /\b$Storage\b/ &&
5851 $line !~ /^.\s*$Storage/ &&
5852 $line =~ /^.\s*(.+?)\$Storage\s/ &&
5860 if ($line =~ /\b$Type\s+$Inline\b/ ||
5861 $line =~ /\b$Inline\s+$Storage\b/) {
5868 $line =~ /\b(__inline__|__inline)\b/) {
5879 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
5886 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
5893 $line =~ /\b__attribute__\s*\(\s*\(.*_*section_*\s*\(\s*("[^"]*")/) {
5905 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
5916 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
5926 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
5927 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
5928 $line =~ /\b__weak\b/)) {
5936 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
5953 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
5973 if ($line =~ /\bsizeof\s*\(\s*\&/) {
5979 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
5988 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
5995 my $fmt = get_quoted_string($line, $rawline);
6156 $line =~ /\bsscanf\b/ &&
6170 $line =~ /\bsscanf\b/) {
6187 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
6273 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
6281 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
6317 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
6324 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6330 if ($line =~ /;\s*;\s*$/) {
6340 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6351 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(CONFIG_[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*…
6361 if ($line =~ /^.\s*(?:case\s+(?:$Ident|$Constant)\s*|default):/) {
6397 if ($line =~ /\b__FUNCTION__\b/) {
6406 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6412 if ($line =~ /\byield\s*\(\s*\)/) {
6418 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6445 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6451 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6457 if ($line =~ /^.\s*__initcall\s*\(/) {
6463 if ($line =~ /\bspin_is_locked\(/) {
6469 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
6478 if ($line !~ /\bconst\b/ &&
6479 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6486 if ($line =~ /\bNR_CPUS\b/ &&
6487 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6488 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6489 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6490 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6491 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6498 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6505 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6511 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
6517 if ($line =~ /\bin_atomic\s*\(/) {
6528 if ($line =~ /mutex_trylock_recursive/) {
6534 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6535 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6544 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6545 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6615 $line =~ /$mode_perms_search/) {
6648 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
6659 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6660 my $extracted_string = get_quoted_string($line, $rawline);
6677 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {