Lines Matching refs:line

179 		my $line = $_;
181 $line =~ s/\s*\n?$//g;
182 $line =~ s/^\s*//g;
183 $line =~ s/\s+/ /g;
185 next if ($line =~ m/^\s*#/);
186 next if ($line =~ m/^\s*$/);
188 my @words = split(" ", $line);
721 my $line = $_;
723 $line =~ s/\s*\n?$//g;
724 $line =~ s/^\s*//g;
726 next if ($line =~ m/^\s*#/);
727 next if ($line =~ m/^\s*$/);
729 my ($suspect, $fix) = split(/\|\|/, $line);
741 my $line = $_;
743 $line =~ s/\s*\n?$//g;
744 $line =~ s/^\s*//g;
746 next if ($line =~ m/^\s*#/);
747 next if ($line =~ m/^\s*$/);
748 next if ($line =~ m/, disabled/i);
750 $line =~ s/,.*$//;
752 my ($suspect, $fix) = split(/->/, $line);
769 my $line = $_;
771 $line =~ s/\s*\n?$//g;
772 $line =~ s/^\s*//g;
774 next if ($line =~ m/^\s*#/);
775 next if ($line =~ m/^\s*$/);
776 if ($line =~ /\s/) {
777 print("$file: '$line' invalid - ignored\n");
782 $$wordsRef .= $line;
898 foreach my $line (@lines) {
899 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
900 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
902 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
904 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1049 foreach my $line (split(/\n/, $lines)) {
1050 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1271 my ($line) = @_;
1274 $line =~ s/^.//;
1275 $line = expand_tabs($line);
1278 my ($white) = ($line =~ /^(\s*)/);
1280 return (length($line), length($white));
1295 my ($line) = @_;
1305 $res = substr($line, 0, 1);
1307 for ($off = 1; $off < length($line); $off++) {
1308 $c = substr($line, $off, 1);
1312 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1319 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1325 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1388 my ($line, $rawline) = @_;
1390 return "" if (!defined($line) || !defined($rawline));
1391 return "" if ($line !~ m/($String)/g);
1397 my $line = $linenr - 1;
1420 for (; $remain > 0; $line++) {
1421 last if (!defined $lines[$line]);
1422 next if ($lines[$line] =~ /^-/);
1425 $blk .= $lines[$line] . "\n";
1427 $line++;
1513 $line++;
1526 $line, $remain + 1, $off - $loff + 1, $level);
1603 my $line;
1612 for ($line = $start; $remain > 0; $line++) {
1613 next if ($rawlines[$line] =~ /^-/);
1616 $blk .= $rawlines[$line];
1619 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1621 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1623 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1627 foreach my $c (split(//, $lines[$line])) {
1643 push(@res, $rawlines[$line]);
1700 my $line = $rawlines[$linenr - 1];
1702 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1705 if ($line =~ m@/\*@) {
1711 $current_comment .= $line . "\n" if ($in_comment);
1712 if ($line =~ m@\*/@) {
1736 my $line;
1738 $line = $rawlines[$offset++];
1739 next if (defined($line) && $line =~ /^-/);
1743 return $line;
1998 my ($possible, $line) = @_;
2018 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2029 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2035 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2040 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2128 my $line = $old_line; #don't modify the array
2129 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2131 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2133 fixup_current_range(\$line, $delta_offset, 0);
2150 push(@lines, $line);
2161 my ($linenr, $line) = @_;
2165 LINE => $line,
2171 my ($linenr, $line) = @_;
2175 LINE => $line,
2288 my ($line) = @_;
2292 my $opens = $line =~ tr/\(/\(/;
2293 my $closes = $line =~ tr/\)/\)/;
2301 my $len = length($line);
2304 my $string = substr($line, $pos);
2307 } elsif (substr($line, $pos, 1) eq '(') {
2314 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2389 my $line;
2392 $line = $rawline;
2449 $line = sanitise_line($rawline);
2451 push(@lines, $line);
2454 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2462 if ($setup_docs && $line =~ /^\+/) {
2463 push(@setup_docs, $line);
2472 foreach my $line (@lines) {
2475 my $sline = $line; #copy of $line
2482 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2483 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2484 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2490 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2517 } elsif ($line =~ /^( |\+|$)/) {
2525 ($prevline, $stashline) = ($stashline, $line);
2542 if ($line =~ /^diff --git.*?(\S+)$/) {
2547 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2624 if ($line !~ /^\s*$/) {
2635 (($line =~ m@^\s+diff\b.*a/[\w/]+@ &&
2636 $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) ||
2637 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2638 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2645 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2655 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2657 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2662 if ($line =~ /^\s*signed-off-by:/i) {
2666 my $l = $line;
2675 if ($line =~ /^---$/) {
2682 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2739 my $sig_nospace = $line;
2770 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2776 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
2783 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2784 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2786 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
2787 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
2788 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
2795 length($line) > 75 &&
2796 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2798 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2800 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2810 $line =~ /^\s*$/) {
2816 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
2817 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2818 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2819 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2820 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2821 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2834 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2837 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2841 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2842 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2843 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2844 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2845 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2848 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2853 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2856 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2875 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2876 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2877 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2885 ($line =~ /^new file mode\s*\d+\s*$/) &&
2892 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2899 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2937 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2952 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
2969 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
2980 next if (!$hunk_line || $line =~ /^-/);
2983 if ($line =~ /^\+.*\015/) {
3020 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3106 $line =~ /^\+\s*\bboolean\b/) {
3112 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3133 (($realfile =~ /\.(dts|dtsi|overlay)$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3134 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3217 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3238 if ($line =~ /^\+/ && $length > $max_line_length) {
3245 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3246 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3251 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3252 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3256 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3257 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3267 } elsif ($line =~ /($;[\s$;]*)$/ &&
3268 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3273 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3287 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3393 $line =~ /^(\+| )([ \t]*)/;
3406 $fix && $line =~ /^\+/) {
3421 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3462 $line =~ /^\+[ \t]*$;/ && #leading comment
3487 $line =~ /^\+/ &&
3488 !($line =~ /^\+\s*$/ ||
3489 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3490 $line =~ /^\+\s*MODULE_/i ||
3491 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3492 $line =~ /^\+[a-z_]*init/ ||
3493 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3494 $line =~ /^\+\s*DECLARE/ ||
3495 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
3496 $line =~ /^\+\s*__setup/)) {
3506 $line =~ /^\+\s*$/ &&
3564 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/ &&
3578 if ($line =~ /^\+.*([\[\(])\s*$/) {
3625 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3712 if ($line=~/\bswitch\s*\(.*\)/) {
3735 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[A-Z_]+|)FOR_EACH(?!_NONEMPTY_TERM)[A-Z_]+)\s*\(|do…
3740 if ($line =~ /^\+\t{6,}/) {
3781line =~ /\b(?:(?:if|while|for|(?:[A-Z_]+|)FOR_EACH(?!_NONEMPTY_TERM|_IDX|_FIXED_ARG|_IDX_FIXED_ARG…
3882 my $opline = $line; $opline =~ s/^./ /;
3895 next if ($line =~ /^[^\+]/);
3899 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3902 $line =~ /^.\s*($Lval)/;
3910 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3935 if ($line =~ /^.\s*$Declare\s*$/) {
3938 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
3946 if ($line =~ /^.\s*$Modifier\s*$/) {
3949 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
3957 if ($line =~ /^.\s*{/ &&
3961 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3967 $fixedline = $line;
3991 if ($line =~ m{//}) {
3995 my $line = $fixed[$fixlinenr];
3996 if ($line =~ /\/\/(.*)$/) {
4003 $line =~ s@//.*@@;
4040 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
4041 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
4052 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
4060 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4097 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4104 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4113 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4132 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4139 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4141 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4152 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4163 if ($line =~ /\btypedef\s/ &&
4164 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4165 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4166 $line !~ /\b$typeTypedefs\b/ &&
4167 $line !~ /\b__bitwise\b/) {
4175 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4200 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4230 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
4238 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4244 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4250 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4255 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
4265 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4277 if ($line =~ /\bENOSYS\b/) {
4285 if (!$file && $line =~ /\bENOTSUPP\b/) {
4316 if ($line =~ /^.\s*{/ &&
4320 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4334 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4346 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4418 while ($line =~ /(.*?\s)\[/g) {
4435 while ($line =~ /($Ident)\s+\(/g) {
4437 my $ctx_before = substr($line, 0, $-[1]);
4470 if (!($line=~/\#\s*include/)) {
4788 if ($line =~ /^\+.*\S\s+;\s*$/) {
4798 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4820 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4821 $line =~ /\b(?:else|do)\{/) {
4839 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
4849 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4857 if ($line =~ /\s\]/) {
4867 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4868 $line !~ /for\s*\(\s+;/) {
4876 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4877 $line !~ /for\s*\(.*;\s+\)/ &&
4878 $line !~ /:\s+\)/) {
4890 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4902 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
4985 $line =~ /\bif\s*((?:\(\s*){2,})/) {
4989 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5002 …!($line =~ /^\+(.*)($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*(.*)($Constant|[A-Z_][A-Z0-9_]*)(.*…
5003 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5040 if ($line =~ /\b(if|while|for|switch)\(/) {
5051 if ($line =~ /do\s*(?!{)/) {
5074 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5129 if ($line =~ /
5145 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5154 if ($line =~ /}\s*if\b/) {
5160 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5161 $line !~ /\G(?:
5172 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5176 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5190 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5202 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5216 while ($line =~ m{($Constant|$Lval)}g) {
5249 if ($line =~ /\#\s*define.*\\\s+$/) {
5283 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
5432 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
5433 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
5434 $line =~ /^\+.*\\$/) {
5445 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5485 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5539 $line =~ /\b(if|while|for|else)\b/) {
5544 if (substr($line, 0, $-[0]) =~ /([\#\}]\s*)$/) {
5579 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5596 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5605 if ($line =~ /^\+\s*$String/ &&
5613 my $extracted_string = get_quoted_string($line, $rawline);
5644 if ($line =~ /^\+.*$String/ &&
5646 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5647 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5663 if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
5667 while ($line =~ /($String)/g) {
5676 if ($line =~ /$String\s*"/) {
5680 while ($line =~ /($String)(?=\s*")/g) {
5690 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5719 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5725 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
5734 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5764 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5782 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5783 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5793 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5800 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5808 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5821 if ($line =~ /(\b$InitAttribute\b)/) {
5823 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5839 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5853 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5868 if ($line =~ /\b__read_mostly\b/ &&
5869 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5879 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5891 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
5905 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
5913 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
5919 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
5932 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
5943 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
5944 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
5972 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
5983 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
5984 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
5990 if ($line =~ /\bwaitqueue_active\s*\(/) {
5998 if ($line =~ /\bdata_race\s*\(/) {
6006 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6012 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6017 if ($line =~ /\b$Storage\b/ &&
6018 $line !~ /^.\s*$Storage/ &&
6019 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6027 if ($line =~ /\b$Type\s+$Inline\b/ ||
6028 $line =~ /\b$Inline\s+$Storage\b/) {
6035 $line =~ /\b(__inline__|__inline)\b/) {
6046 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
6054 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
6061 $line =~ /\b__attribute__\s*\(\s*\(.*_*section_*\s*\(\s*("[^"]*")/) {
6073 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
6084 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
6094 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6095 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6096 $line =~ /\b__weak\b/)) {
6103 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6120 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6140 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6146 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6155 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6162 my $fmt = get_quoted_string($line, $rawline);
6326 $line =~ /\bsscanf\b/ &&
6340 $line =~ /\bsscanf\b/) {
6357 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
6442 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
6450 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
6486 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
6493 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6499 if ($line =~ /;\s*;\s*$/) {
6509 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6521 if ($line =~ /#\s*define\s+$api_defines/) {
6533 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(CONFIG_[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*…
6554 if ($line =~ /\b__FUNCTION__\b/) {
6563 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6570 $line =~ /\b(__BYTE_ORDER__)\b/g) {
6576 if ($line =~ /\byield\s*\(\s*\)/) {
6582 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6609 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6615 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6621 if ($line =~ /^.\s*__initcall\s*\(/) {
6627 if ($line =~ /\bspin_is_locked\(/) {
6633 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
6643 $line !~ /\bconst\b/ &&
6644 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6651 if ($line =~ /\bNR_CPUS\b/ &&
6652 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6653 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6654 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6655 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6656 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6663 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6670 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6676 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
6682 if ($line =~ /\bin_atomic\s*\(/) {
6693 if ($line =~ /mutex_trylock_recursive/) {
6699 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6700 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6709 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6710 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6780 $line =~ /$mode_perms_search/) {
6813 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
6824 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6825 my $extracted_string = get_quoted_string($line, $rawline);
6842 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {