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);
718 my $line = $_;
720 $line =~ s/\s*\n?$//g;
721 $line =~ s/^\s*//g;
723 next if ($line =~ m/^\s*#/);
724 next if ($line =~ m/^\s*$/);
726 my ($suspect, $fix) = split(/\|\|/, $line);
738 my $line = $_;
740 $line =~ s/\s*\n?$//g;
741 $line =~ s/^\s*//g;
743 next if ($line =~ m/^\s*#/);
744 next if ($line =~ m/^\s*$/);
745 next if ($line =~ m/, disabled/i);
747 $line =~ s/,.*$//;
749 my ($suspect, $fix) = split(/->/, $line);
766 my $line = $_;
768 $line =~ s/\s*\n?$//g;
769 $line =~ s/^\s*//g;
771 next if ($line =~ m/^\s*#/);
772 next if ($line =~ m/^\s*$/);
773 if ($line =~ /\s/) {
774 print("$file: '$line' invalid - ignored\n");
779 $$wordsRef .= $line;
895 foreach my $line (@lines) {
896 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
897 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
899 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
901 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1046 foreach my $line (split(/\n/, $lines)) {
1047 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1268 my ($line) = @_;
1271 $line =~ s/^.//;
1272 $line = expand_tabs($line);
1275 my ($white) = ($line =~ /^(\s*)/);
1277 return (length($line), length($white));
1292 my ($line) = @_;
1302 $res = substr($line, 0, 1);
1304 for ($off = 1; $off < length($line); $off++) {
1305 $c = substr($line, $off, 1);
1309 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1316 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1322 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1385 my ($line, $rawline) = @_;
1387 return "" if (!defined($line) || !defined($rawline));
1388 return "" if ($line !~ m/($String)/g);
1394 my $line = $linenr - 1;
1417 for (; $remain > 0; $line++) {
1418 last if (!defined $lines[$line]);
1419 next if ($lines[$line] =~ /^-/);
1422 $blk .= $lines[$line] . "\n";
1424 $line++;
1510 $line++;
1523 $line, $remain + 1, $off - $loff + 1, $level);
1600 my $line;
1609 for ($line = $start; $remain > 0; $line++) {
1610 next if ($rawlines[$line] =~ /^-/);
1613 $blk .= $rawlines[$line];
1616 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1618 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1620 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1624 foreach my $c (split(//, $lines[$line])) {
1640 push(@res, $rawlines[$line]);
1697 my $line = $rawlines[$linenr - 1];
1699 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1702 if ($line =~ m@/\*@) {
1708 $current_comment .= $line . "\n" if ($in_comment);
1709 if ($line =~ m@\*/@) {
1733 my $line;
1735 $line = $rawlines[$offset++];
1736 next if (defined($line) && $line =~ /^-/);
1740 return $line;
1995 my ($possible, $line) = @_;
2015 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2026 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2032 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2037 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2125 my $line = $old_line; #don't modify the array
2126 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2128 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2130 fixup_current_range(\$line, $delta_offset, 0);
2147 push(@lines, $line);
2158 my ($linenr, $line) = @_;
2162 LINE => $line,
2168 my ($linenr, $line) = @_;
2172 LINE => $line,
2285 my ($line) = @_;
2289 my $opens = $line =~ tr/\(/\(/;
2290 my $closes = $line =~ tr/\)/\)/;
2298 my $len = length($line);
2301 my $string = substr($line, $pos);
2304 } elsif (substr($line, $pos, 1) eq '(') {
2311 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2386 my $line;
2389 $line = $rawline;
2446 $line = sanitise_line($rawline);
2448 push(@lines, $line);
2451 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2459 if ($setup_docs && $line =~ /^\+/) {
2460 push(@setup_docs, $line);
2469 foreach my $line (@lines) {
2472 my $sline = $line; #copy of $line
2479 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2480 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2481 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2487 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2514 } elsif ($line =~ /^( |\+|$)/) {
2522 ($prevline, $stashline) = ($stashline, $line);
2539 if ($line =~ /^diff --git.*?(\S+)$/) {
2544 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2621 if ($line !~ /^\s*$/) {
2632 (($line =~ m@^\s+diff\b.*a/[\w/]+@ &&
2633 $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) ||
2634 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2635 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2642 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2652 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2654 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2659 if ($line =~ /^\s*signed-off-by:/i) {
2663 my $l = $line;
2672 if ($line =~ /^---$/) {
2679 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2736 my $sig_nospace = $line;
2767 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2773 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
2780 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2781 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2783 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
2784 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
2785 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
2792 length($line) > 75 &&
2793 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2795 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2797 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2807 $line =~ /^\s*$/) {
2813 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
2814 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2815 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2816 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2817 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2818 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2831 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2834 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2838 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2839 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2840 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2841 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2842 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2845 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2850 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2853 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2872 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2873 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2874 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2882 ($line =~ /^new file mode\s*\d+\s*$/) &&
2889 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2896 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2934 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2949 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
2966 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
2977 next if (!$hunk_line || $line =~ /^-/);
2980 if ($line =~ /^\+.*\015/) {
3017 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3103 $line =~ /^\+\s*\bboolean\b/) {
3109 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
3130 (($realfile =~ /\.(dts|dtsi|overlay)$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3131 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3214 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3235 if ($line =~ /^\+/ && $length > $max_line_length) {
3242 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3243 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3248 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3249 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3253 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3254 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3264 } elsif ($line =~ /($;[\s$;]*)$/ &&
3265 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3270 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3284 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3390 $line =~ /^(\+| )([ \t]*)/;
3403 $fix && $line =~ /^\+/) {
3418 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3459 $line =~ /^\+[ \t]*$;/ && #leading comment
3484 $line =~ /^\+/ &&
3485 !($line =~ /^\+\s*$/ ||
3486 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3487 $line =~ /^\+\s*MODULE_/i ||
3488 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3489 $line =~ /^\+[a-z_]*init/ ||
3490 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3491 $line =~ /^\+\s*DECLARE/ ||
3492 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
3493 $line =~ /^\+\s*__setup/)) {
3503 $line =~ /^\+\s*$/ &&
3561 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/ &&
3575 if ($line =~ /^\+.*([\[\(])\s*$/) {
3622 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3709 if ($line=~/\bswitch\s*\(.*\)/) {
3732 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[A-Z_]+|)FOR_EACH(?!_NONEMPTY_TERM)[A-Z_]+)\s*\(|do…
3737 if ($line =~ /^\+\t{6,}/) {
3778line =~ /\b(?:(?:if|while|for|(?:[A-Z_]+|)FOR_EACH(?!_NONEMPTY_TERM|_IDX|_FIXED_ARG|_IDX_FIXED_ARG…
3879 my $opline = $line; $opline =~ s/^./ /;
3892 next if ($line =~ /^[^\+]/);
3896 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3899 $line =~ /^.\s*($Lval)/;
3907 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3932 if ($line =~ /^.\s*$Declare\s*$/) {
3935 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
3943 if ($line =~ /^.\s*$Modifier\s*$/) {
3946 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
3954 if ($line =~ /^.\s*{/ &&
3958 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3964 $fixedline = $line;
3988 if ($line =~ m{//}) {
3992 my $line = $fixed[$fixlinenr];
3993 if ($line =~ /\/\/(.*)$/) {
4000 $line =~ s@//.*@@;
4037 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
4038 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
4049 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
4057 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4094 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4101 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4110 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4129 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4136 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4138 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4149 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4160 if ($line =~ /\btypedef\s/ &&
4161 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4162 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4163 $line !~ /\b$typeTypedefs\b/ &&
4164 $line !~ /\b__bitwise\b/) {
4172 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4197 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4227 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
4235 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4241 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4247 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4252 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
4262 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4274 if ($line =~ /\bENOSYS\b/) {
4282 if (!$file && $line =~ /\bENOTSUPP\b/) {
4313 if ($line =~ /^.\s*{/ &&
4317 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4331 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4343 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4415 while ($line =~ /(.*?\s)\[/g) {
4432 while ($line =~ /($Ident)\s+\(/g) {
4434 my $ctx_before = substr($line, 0, $-[1]);
4467 if (!($line=~/\#\s*include/)) {
4785 if ($line =~ /^\+.*\S\s+;\s*$/) {
4795 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4817 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4818 $line =~ /\b(?:else|do)\{/) {
4836 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
4846 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4854 if ($line =~ /\s\]/) {
4864 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4865 $line !~ /for\s*\(\s+;/) {
4873 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4874 $line !~ /for\s*\(.*;\s+\)/ &&
4875 $line !~ /:\s+\)/) {
4887 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4899 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
4982 $line =~ /\bif\s*((?:\(\s*){2,})/) {
4986 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
4999 …!($line =~ /^\+(.*)($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*(.*)($Constant|[A-Z_][A-Z0-9_]*)(.*…
5000 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5037 if ($line =~ /\b(if|while|for|switch)\(/) {
5048 if ($line =~ /do\s*(?!{)/) {
5071 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5126 if ($line =~ /
5142 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5151 if ($line =~ /}\s*if\b/) {
5157 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5158 $line !~ /\G(?:
5169 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5173 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5187 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5199 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5213 while ($line =~ m{($Constant|$Lval)}g) {
5246 if ($line =~ /\#\s*define.*\\\s+$/) {
5280 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
5429 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
5430 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
5431 $line =~ /^\+.*\\$/) {
5442 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5482 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5536 $line =~ /\b(if|while|for|else)\b/) {
5541 if (substr($line, 0, $-[0]) =~ /([\#\}]\s*)$/) {
5576 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5593 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5602 if ($line =~ /^\+\s*$String/ &&
5610 my $extracted_string = get_quoted_string($line, $rawline);
5641 if ($line =~ /^\+.*$String/ &&
5643 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5644 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5660 if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
5664 while ($line =~ /($String)/g) {
5673 if ($line =~ /$String\s*"/) {
5677 while ($line =~ /($String)(?=\s*")/g) {
5687 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5716 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5722 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
5731 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5761 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5779 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5780 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5790 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5797 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5805 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5818 if ($line =~ /(\b$InitAttribute\b)/) {
5820 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5836 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5850 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5865 if ($line =~ /\b__read_mostly\b/ &&
5866 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5876 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5888 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
5902 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
5910 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
5916 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
5929 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
5940 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
5941 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
5969 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
5980 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
5981 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
5987 if ($line =~ /\bwaitqueue_active\s*\(/) {
5995 if ($line =~ /\bdata_race\s*\(/) {
6003 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6009 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6014 if ($line =~ /\b$Storage\b/ &&
6015 $line !~ /^.\s*$Storage/ &&
6016 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6024 if ($line =~ /\b$Type\s+$Inline\b/ ||
6025 $line =~ /\b$Inline\s+$Storage\b/) {
6032 $line =~ /\b(__inline__|__inline)\b/) {
6043 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
6050 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
6057 $line =~ /\b__attribute__\s*\(\s*\(.*_*section_*\s*\(\s*("[^"]*")/) {
6069 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
6080 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
6090 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6091 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6092 $line =~ /\b__weak\b/)) {
6099 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6116 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6136 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6142 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6151 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6158 my $fmt = get_quoted_string($line, $rawline);
6322 $line =~ /\bsscanf\b/ &&
6336 $line =~ /\bsscanf\b/) {
6353 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
6438 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
6446 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
6482 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
6489 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6495 if ($line =~ /;\s*;\s*$/) {
6505 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6517 if ($line =~ /#\s*define\s+$api_defines/) {
6529 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(CONFIG_[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*…
6550 if ($line =~ /\b__FUNCTION__\b/) {
6559 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6565 while ($line =~ /\b(__BYTE_ORDER__)\b/g) {
6571 if ($line =~ /\byield\s*\(\s*\)/) {
6577 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6604 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6610 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6616 if ($line =~ /^.\s*__initcall\s*\(/) {
6622 if ($line =~ /\bspin_is_locked\(/) {
6628 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
6638 $line !~ /\bconst\b/ &&
6639 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6646 if ($line =~ /\bNR_CPUS\b/ &&
6647 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6648 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6649 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6650 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6651 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6658 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6665 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6671 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
6677 if ($line =~ /\bin_atomic\s*\(/) {
6688 if ($line =~ /mutex_trylock_recursive/) {
6694 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6695 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6704 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6705 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6775 $line =~ /$mode_perms_search/) {
6808 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
6819 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6820 my $extracted_string = get_quoted_string($line, $rawline);
6837 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {