• Home
  • Raw
  • Download

Lines Matching refs:line

171 		my $line = $_;
173 $line =~ s/\s*\n?$//g;
174 $line =~ s/^\s*//g;
175 $line =~ s/\s+/ /g;
177 next if ($line =~ m/^\s*#/);
178 next if ($line =~ m/^\s*$/);
180 my @words = split(" ", $line);
655 my $line = $_;
657 $line =~ s/\s*\n?$//g;
658 $line =~ s/^\s*//g;
660 next if ($line =~ m/^\s*#/);
661 next if ($line =~ m/^\s*$/);
663 my ($suspect, $fix) = split(/\|\|/, $line);
675 my $line = $_;
677 $line =~ s/\s*\n?$//g;
678 $line =~ s/^\s*//g;
680 next if ($line =~ m/^\s*#/);
681 next if ($line =~ m/^\s*$/);
682 next if ($line =~ m/, disabled/i);
684 $line =~ s/,.*$//;
686 my ($suspect, $fix) = split(/->/, $line);
703 my $line = $_;
705 $line =~ s/\s*\n?$//g;
706 $line =~ s/^\s*//g;
708 next if ($line =~ m/^\s*#/);
709 next if ($line =~ m/^\s*$/);
710 if ($line =~ /\s/) {
711 print("$file: '$line' invalid - ignored\n");
716 $$wordsRef .= $line;
831 foreach my $line (@lines) {
832 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
833 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
835 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
837 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
978 foreach my $line (split(/\n/, $lines)) {
979 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1198 my ($line) = @_;
1201 $line =~ s/^.//;
1202 $line = expand_tabs($line);
1205 my ($white) = ($line =~ /^(\s*)/);
1207 return (length($line), length($white));
1222 my ($line) = @_;
1232 $res = substr($line, 0, 1);
1234 for ($off = 1; $off < length($line); $off++) {
1235 $c = substr($line, $off, 1);
1239 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1246 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1252 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1315 my ($line, $rawline) = @_;
1317 return "" if (!defined($line) || !defined($rawline));
1318 return "" if ($line !~ m/($String)/g);
1324 my $line = $linenr - 1;
1347 for (; $remain > 0; $line++) {
1348 last if (!defined $lines[$line]);
1349 next if ($lines[$line] =~ /^-/);
1352 $blk .= $lines[$line] . "\n";
1354 $line++;
1440 $line++;
1453 $line, $remain + 1, $off - $loff + 1, $level);
1530 my $line;
1539 for ($line = $start; $remain > 0; $line++) {
1540 next if ($rawlines[$line] =~ /^-/);
1543 $blk .= $rawlines[$line];
1546 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1548 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1550 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1554 foreach my $c (split(//, $lines[$line])) {
1570 push(@res, $rawlines[$line]);
1619 my $line = $rawlines[$linenr - 1];
1621 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1624 if ($line =~ m@/\*@) {
1630 $current_comment .= $line . "\n" if ($in_comment);
1631 if ($line =~ m@\*/@) {
1655 my $line;
1657 $line = $rawlines[$offset++];
1658 next if (defined($line) && $line =~ /^-/);
1662 return $line;
1917 my ($possible, $line) = @_;
1937 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1948 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1954 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1959 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2047 my $line = $old_line; #don't modify the array
2048 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2050 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2052 fixup_current_range(\$line, $delta_offset, 0);
2069 push(@lines, $line);
2080 my ($linenr, $line) = @_;
2084 LINE => $line,
2090 my ($linenr, $line) = @_;
2094 LINE => $line,
2207 my ($line) = @_;
2211 my $opens = $line =~ tr/\(/\(/;
2212 my $closes = $line =~ tr/\)/\)/;
2220 my $len = length($line);
2223 my $string = substr($line, $pos);
2226 } elsif (substr($line, $pos, 1) eq '(') {
2233 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2307 my $line;
2310 $line = $rawline;
2367 $line = sanitise_line($rawline);
2369 push(@lines, $line);
2372 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2380 if ($setup_docs && $line =~ /^\+/) {
2381 push(@setup_docs, $line);
2390 foreach my $line (@lines) {
2393 my $sline = $line; #copy of $line
2400 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2401 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2402 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2408 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2435 } elsif ($line =~ /^( |\+|$)/) {
2443 ($prevline, $stashline) = ($stashline, $line);
2460 if ($line =~ /^diff --git.*?(\S+)$/) {
2465 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2533 if ($line !~ /^\s*$/) {
2544 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2545 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2546 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2547 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2554 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2564 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2566 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2571 if ($line =~ /^\s*signed-off-by:/i) {
2575 my $l = $line;
2585 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
2591 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2648 my $sig_nospace = $line;
2661 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2667 if ($in_commit_log && $line =~ /^\s*change-id:/i) {
2674 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2675 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2677 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/)) {
2684 length($line) > 75 &&
2685 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2687 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2689 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2699 $line =~ /^\s*$/) {
2705 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
2706 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2707 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2708 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2709 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2710 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2723 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2726 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2730 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2731 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2732 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2733 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2734 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2737 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2742 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2745 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2764 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2765 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2766 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2775 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2782 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2820 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2834 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
2851 next if (!$hunk_line || $line =~ /^-/);
2854 if ($line =~ /^\+.*\015/) {
2891 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
2952 $line =~ /^\+\s*\bboolean\b/) {
2958 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
2973 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
2974 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3051 if ($line =~ /^\+/ && $length > $max_line_length) {
3058 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3059 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3064 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3065 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3069 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3070 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3080 } elsif ($line =~ /($;[\s$;]*)$/ &&
3081 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3086 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3098 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3166 $line =~ /^(\+| )([ \t]*)/;
3179 $fix && $line =~ /^\+/) {
3194 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3235 $line =~ /^\+[ \t]*$;/ && #leading comment
3260 $line =~ /^\+/ &&
3261 !($line =~ /^\+\s*$/ ||
3262 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3263 $line =~ /^\+\s*MODULE_/i ||
3264 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3265 $line =~ /^\+[a-z_]*init/ ||
3266 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3267 $line =~ /^\+\s*DECLARE/ ||
3268 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
3269 $line =~ /^\+\s*__setup/)) {
3279 $line =~ /^\+\s*$/ &&
3336 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
3349 if ($line =~ /^\+.*([\[\(])\s*$/) {
3396 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3483 if ($line=~/\bswitch\s*\(.*\)/) {
3506 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
3511 if ($line =~ /^\+\t{6,}/) {
3552 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
3653 my $opline = $line; $opline =~ s/^./ /;
3666 next if ($line =~ /^[^\+]/);
3670 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3673 $line =~ /^.\s*($Lval)/;
3681 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3706 if ($line =~ /^.\s*$Declare\s*$/) {
3709 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
3717 if ($line =~ /^.\s*$Modifier\s*$/) {
3720 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
3728 if ($line =~ /^.\s*{/ &&
3732 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3738 $fixedline = $line;
3762 if ($line =~ m{//}) {
3766 my $line = $fixed[$fixlinenr];
3767 if ($line =~ /\/\/(.*)$/) {
3774 $line =~ s@//.*@@;
3811 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
3812 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
3823 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
3831 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
3868 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
3875 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
3894 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
3901 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
3903 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
3914 if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) {
3924 if ($line =~ /\btypedef\s/ &&
3925 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
3926 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
3927 $line !~ /\b$typeTypedefs\b/ &&
3928 $line !~ /\b__bitwise\b/) {
3935 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
3960 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
3990 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
3998 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4004 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4010 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4015 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
4025 if ($line =~ /\bpr_warning\s*\(/) {
4034 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4046 if ($line =~ /\bENOSYS\b/) {
4074 if ($line =~ /^.\s*{/ &&
4078 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4092 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4104 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4175 while ($line =~ /(.*?\s)\[/g) {
4190 while ($line =~ /($Ident)\s+\(/g) {
4192 my $ctx_before = substr($line, 0, $-[1]);
4225 if (!($line=~/\#\s*include/)) {
4536 if ($line =~ /^\+.*\S\s+;\s*$/) {
4546 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4568 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4569 $line =~ /\b(?:else|do)\{/) {
4587 if ($line =~ /}(?!(?:,|;|\)))\S/) {
4597 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4605 if ($line =~ /\s\]/) {
4615 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4616 $line !~ /for\s*\(\s+;/) {
4624 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4625 $line !~ /for\s*\(.*;\s+\)/ &&
4626 $line !~ /:\s+\)/) {
4638 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4650 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
4688 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
4689 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
4729 $line =~ /\bif\s*((?:\(\s*){2,})/) {
4733 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
4746 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
4780 if ($line =~ /\b(if|while|for|switch)\(/) {
4791 if ($line =~ /do\s*(?!{)/) {
4814 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
4847 if ($line =~ /
4863 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
4872 if ($line =~ /}\s*if\b/) {
4878 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
4879 $line !~ /\G(?:
4890 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
4894 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4908 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
4920 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4934 while ($line =~ m{($Constant|$Lval)}g) {
4977 if ($line =~ /\#\s*define.*\\\s+$/) {
5011 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
5160 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
5161 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
5162 $line =~ /^\+.*\\$/) {
5173 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5213 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5276 $line =~ /\b(if|while|for|else)\b/) {
5280 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
5333 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5350 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5359 if ($line =~ /^\+\s*$String/ &&
5367 my $extracted_string = get_quoted_string($line, $rawline);
5398 if ($line =~ /^\+.*$String/ &&
5400 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5401 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5417 if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) {
5421 while ($line =~ /($String)/g) {
5430 if ($line =~ /$String\s*"/) {
5434 while ($line =~ /($String)(?=\s*")/g) {
5444 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5473 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5479 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
5488 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5518 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5535 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5536 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5546 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5553 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5561 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5574 if ($line =~ /(\b$InitAttribute\b)/) {
5576 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5592 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5606 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5621 if ($line =~ /\b__read_mostly\b/ &&
5622 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5632 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5644 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
5658 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
5666 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
5672 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
5685 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
5696 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
5697 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
5726 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
5737 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
5738 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
5744 if ($line =~ /\bwaitqueue_active\s*\(/) {
5752 if (!$file && $line =~ /\b(smp_|)read_barrier_depends\s*\(/) {
5758 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
5764 if ($line =~ /\b($Type)\s+($Storage)\b/) {
5769 if ($line =~ /\b$Storage\b/ &&
5770 $line !~ /^.\s*$Storage/ &&
5771 $line =~ /^.\s*(.+?)\$Storage\s/ &&
5779 if ($line =~ /\b$Type\s+$Inline\b/ ||
5780 $line =~ /\b$Inline\s+$Storage\b/) {
5787 $line =~ /\b(__inline__|__inline)\b/) {
5798 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
5805 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
5812 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
5823 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
5833 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
5834 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
5835 $line =~ /\b__weak\b/)) {
5843 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
5860 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
5880 if ($line =~ /\bsizeof\s*\(\s*\&/) {
5886 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
5895 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
5902 my $fmt = get_quoted_string($line, $rawline);
6063 $line =~ /\bsscanf\b/ &&
6077 $line =~ /\bsscanf\b/) {
6094 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
6180 if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) {
6188 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*([kv][mz]alloc(?:_node)?)\s*\(\s*(sizeof\s*\(\s…
6224 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
6231 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6237 if ($line =~ /;\s*;\s*$/) {
6247 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6258 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(CONFIG_[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*…
6268 if ($line =~ /^.\s*(?:case\s+(?:$Ident|$Constant)\s*|default):/) {
6304 if ($line =~ /\b__FUNCTION__\b/) {
6313 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6319 if ($line =~ /\byield\s*\(\s*\)/) {
6325 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6365 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6371 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6377 if ($line =~ /^.\s*__initcall\s*\(/) {
6384 if ($line !~ /\bconst\b/ &&
6385 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6392 if ($line =~ /\bNR_CPUS\b/ &&
6393 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6394 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6395 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6396 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6397 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6404 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6411 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6417 if ($line =~ /\bin_atomic\s*\(/) {
6428 if ($line =~ /mutex_trylock_recursive/) {
6434 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6435 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6444 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6445 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6515 $line =~ /$mode_perms_search/) {
6548 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
6559 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6560 my $extracted_string = get_quoted_string($line, $rawline);