Lines Matching refs:line

167 		my $line = $_;
169 $line =~ s/\s*\n?$//g;
170 $line =~ s/^\s*//g;
171 $line =~ s/\s+/ /g;
173 next if ($line =~ m/^\s*#/);
174 next if ($line =~ m/^\s*$/);
176 my @words = split(" ", $line);
616 my $line = $_;
618 $line =~ s/\s*\n?$//g;
619 $line =~ s/^\s*//g;
621 next if ($line =~ m/^\s*#/);
622 next if ($line =~ m/^\s*$/);
624 my ($suspect, $fix) = split(/\|\|/, $line);
636 my $line = $_;
638 $line =~ s/\s*\n?$//g;
639 $line =~ s/^\s*//g;
641 next if ($line =~ m/^\s*#/);
642 next if ($line =~ m/^\s*$/);
643 next if ($line =~ m/, disabled/i);
645 $line =~ s/,.*$//;
647 my ($suspect, $fix) = split(/->/, $line);
664 my $line = $_;
666 $line =~ s/\s*\n?$//g;
667 $line =~ s/^\s*//g;
669 next if ($line =~ m/^\s*#/);
670 next if ($line =~ m/^\s*$/);
671 if ($line =~ /\s/) {
672 print("$file: '$line' invalid - ignored\n");
677 $$wordsRef .= $line;
791 foreach my $line (@lines) {
792 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
793 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
795 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
797 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
927 foreach my $line (split(/\n/, $lines)) {
928 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1147 my ($line) = @_;
1150 $line =~ s/^.//;
1151 $line = expand_tabs($line);
1154 my ($white) = ($line =~ /^(\s*)/);
1156 return (length($line), length($white));
1171 my ($line) = @_;
1181 $res = substr($line, 0, 1);
1183 for ($off = 1; $off < length($line); $off++) {
1184 $c = substr($line, $off, 1);
1188 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1195 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1201 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1264 my ($line, $rawline) = @_;
1266 return "" if ($line !~ m/($String)/g);
1272 my $line = $linenr - 1;
1295 for (; $remain > 0; $line++) {
1296 last if (!defined $lines[$line]);
1297 next if ($lines[$line] =~ /^-/);
1300 $blk .= $lines[$line] . "\n";
1302 $line++;
1388 $line++;
1401 $line, $remain + 1, $off - $loff + 1, $level);
1478 my $line;
1487 for ($line = $start; $remain > 0; $line++) {
1488 next if ($rawlines[$line] =~ /^-/);
1491 $blk .= $rawlines[$line];
1494 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1496 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1498 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1502 foreach my $c (split(//, $lines[$line])) {
1518 push(@res, $rawlines[$line]);
1567 my $line = $rawlines[$linenr - 1];
1569 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1572 if ($line =~ m@/\*@) {
1578 $current_comment .= $line . "\n" if ($in_comment);
1579 if ($line =~ m@\*/@) {
1603 my $line;
1605 $line = $rawlines[$offset++];
1606 next if (defined($line) && $line =~ /^-/);
1610 return $line;
1843 my ($possible, $line) = @_;
1863 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1874 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1880 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1885 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
1973 my $line = $old_line; #don't modify the array
1974 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
1976 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
1978 fixup_current_range(\$line, $delta_offset, 0);
1995 push(@lines, $line);
2006 my ($linenr, $line) = @_;
2010 LINE => $line,
2016 my ($linenr, $line) = @_;
2020 LINE => $line,
2133 my ($line) = @_;
2137 my $opens = $line =~ tr/\(/\(/;
2138 my $closes = $line =~ tr/\)/\)/;
2146 my $len = length($line);
2149 my $string = substr($line, $pos);
2152 } elsif (substr($line, $pos, 1) eq '(') {
2159 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2227 my $line;
2230 $line = $rawline;
2287 $line = sanitise_line($rawline);
2289 push(@lines, $line);
2292 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2300 if ($setup_docs && $line =~ /^\+/) {
2301 push(@setup_docs, $line);
2310 foreach my $line (@lines) {
2313 my $sline = $line; #copy of $line
2320 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2347 } elsif ($line =~ /^( |\+|$)/) {
2355 ($prevline, $stashline) = ($stashline, $line);
2372 if ($line =~ /^diff --git.*?(\S+)$/) {
2377 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2430 (($line =~ m@^\s+diff\b.*a/[\w/]+@ &&
2431 $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) ||
2432 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2433 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2440 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2450 if ($line =~ /^\s*signed-off-by:/i) {
2457 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
2463 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
2520 my $sig_nospace = $line;
2533 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
2539 if ($line =~ /^\s*cc:\s*.*<?\bstable\@kernel\.org\b>?.*$/i) {
2545 if ($in_commit_log && $line =~ /^\s*change-id:/i) {
2552 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
2553 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
2555 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/)) {
2562 length($line) > 75 &&
2563 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
2565 $line =~ /^\s*(?:[\w\.\-]+\/)++[\w\.\-]+:/ ||
2567 $line =~ /^\s*(?:Fixes:|Link:)/i ||
2577 $line =~ /^\s*$/) {
2583 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
2584 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
2585 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
2586 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
2587 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
2588 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
2601 if ($line =~ /\b(c)ommit\s+([0-9a-f]{5,})\b/i) {
2604 } elsif ($line =~ /\b([0-9a-f]{12,40})\b/i) {
2608 $short = 0 if ($line =~ /\bcommit\s+[0-9a-f]{12,40}/i);
2609 $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i);
2610 $space = 0 if ($line =~ /\bcommit [0-9a-f]/i);
2611 $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/);
2612 if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) {
2615 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i &&
2620 } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i &&
2623 $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i;
2642 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
2643 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
2644 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
2653 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
2660 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
2698 while ($line =~ m{(?:^|\s)(/\S*)}g) {
2712 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
2729 next if (!$hunk_line || $line =~ /^-/);
2732 if ($line =~ /^\+.*\015/) {
2766 $line =~ /^\+\s*config\s+/) {
2817 $line =~ /^\+\s*\bboolean\b/) {
2823 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
2838 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
2839 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
2885 if ($line =~ /^\+/ && $length > $max_line_length) {
2892 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
2893 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
2898 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
2899 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
2903 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) {
2909 } elsif ($line =~ /($;[\s$;]*)$/ &&
2910 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
2915 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
2927 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
2934 if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) {
2935 my $herevet = "$here\n" . cat_vet($line) . "\n";
2939 if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) {
2940 my $herevet = "$here\n" . cat_vet($line) . "\n";
3003 $line =~ /^(\+| )([ \t]*)/;
3016 $fix && $line =~ /^\+/) {
3031 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
3072 $line =~ /^\+[ \t]*$;/ && #leading comment
3097 $line =~ /^\+/ &&
3098 !($line =~ /^\+\s*$/ ||
3099 $line =~ /^\+\s*EXPORT_SYMBOL/ ||
3100 $line =~ /^\+\s*MODULE_/i ||
3101 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
3102 $line =~ /^\+[a-z_]*init/ ||
3103 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
3104 $line =~ /^\+\s*DECLARE/ ||
3105 $line =~ /^\+\s*__setup/)) {
3115 $line =~ /^\+\s*$/ &&
3172 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
3226 if ($line =~ /__builtin_bfin_csync/) {
3227 my $herevet = "$here\n" . cat_vet($line) . "\n";
3231 if ($line =~ /__builtin_bfin_ssync/) {
3232 my $herevet = "$here\n" . cat_vet($line) . "\n";
3238 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
3325 if ($line=~/\bswitch\s*\(.*\)/) {
3348 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
3353 if ($line =~ /^\+\t{6,}/) {
3394 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
3495 my $opline = $line; $opline =~ s/^./ /;
3508 next if ($line =~ /^[^\+]/);
3512 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
3515 $line =~ /^.\s*($Lval)/;
3523 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
3548 if ($line =~ /^.\s*$Declare\s*$/) {
3551 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
3559 if ($line =~ /^.\s*$Modifier\s*$/) {
3562 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
3570 if ($line =~ /^.\s*{/ &&
3574 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3580 $fixedline = $line;
3604 if ($line =~ m{//}) {
3608 my $line = $fixed[$fixlinenr];
3609 if ($line =~ /\/\/(.*)$/) {
3616 $line =~ s@//.*@@;
3653 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
3654 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
3665 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/) {
3673 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
3690 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
3697 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
3716 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
3723 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
3725 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
3736 if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) {
3746 if ($line =~ /\btypedef\s/ &&
3747 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
3748 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
3749 $line !~ /\b$typeTypedefs\b/ &&
3750 $line !~ /\b__bitwise\b/) {
3757 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
3782 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
3812 if ($line =~ /\b(?:BUG|BUG_ON)\b/) {
3820 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
3826 if ($line =~ /\bprintk_ratelimit\s*\(/) {
3836 if ($line =~ /\bprintk\((?!KERN_)\s*"/) {
3855 if ($line =~ /\bprintk\s*\(\s*KERN_([A-Z]+)/) {
3865 if ($line =~ /\bpr_warning\s*\(/) {
3874 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
3886 if ($line =~ /\bENOSYS\b/) {
3893 if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
3894 !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
3912 if ($line =~ /^.\s*{/ &&
3916 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
3930 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
3942 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
4013 while ($line =~ /(.*?\s)\[/g) {
4028 while ($line =~ /($Ident)\s+\(/g) {
4030 my $ctx_before = substr($line, 0, $-[1]);
4063 if (!($line=~/\#\s*include/)) {
4374 if ($line =~ /^\+.*\S\s+;\s*$/) {
4384 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
4406 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
4407 $line =~ /do\{/) {
4425 if ($line =~ /}(?!(?:,|;|\)))\S/) {
4435 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
4443 if ($line =~ /\s\]/) {
4453 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
4454 $line !~ /for\s*\(\s+;/) {
4462 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
4463 $line !~ /for\s*\(.*;\s+\)/ &&
4464 $line !~ /:\s+\)/) {
4476 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
4488 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
4500 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
4501 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
4541 $line =~ /\bif\s*((?:\(\s*){2,})/) {
4545 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
4558 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
4592 if ($line =~ /\b(if|while|for|switch)\(/) {
4603 if ($line =~ /do\s*(?!{)/) {
4626 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
4659 if ($line =~ /
4675 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
4684 if ($line =~ /}\s*if\b/) {
4690 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
4691 $line !~ /\G(?:
4702 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
4706 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4720 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
4732 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4746 while ($line =~ m{($Constant|$Lval)}g) {
4789 if ($line =~ /\#\s*define.*\\\s+$/) {
4823 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
4978 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
4979 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
4980 $line =~ /^\+.*\\$/) {
4991 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
5043 if ($realfile eq 'vmlinux.lds.h' && $line =~ /(?:(?:^|\s)$Ident\s*=|=\s*$Ident(?:\s|$))/) {
5049 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
5112 $line =~ /\b(if|while|for|else)\b/) {
5116 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
5173 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
5190 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
5199 if ($line =~ /^\+\s*$String/ &&
5207 my $extracted_string = get_quoted_string($line, $rawline);
5238 if ($line =~ /^\+.*$String/ &&
5240 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
5241 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
5257 if ($line =~ /$String[A-Z_]/ ||
5258 ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^L$/)) {
5264 if ($line =~ /$String\s*L?"/) {
5272 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
5301 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
5311 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
5341 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
5358 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
5359 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
5369 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5376 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
5384 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
5397 if ($line =~ /(\b$InitAttribute\b)/) {
5399 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
5415 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
5429 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
5444 if ($line =~ /\b__read_mostly\b/ &&
5445 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
5455 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
5467 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
5481 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
5489 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
5495 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
5508 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
5519 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
5520 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
5549 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
5560 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
5561 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
5567 if ($line =~ /\bwaitqueue_active\s*\(/) {
5575 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
5581 if ($line =~ /\b($Type)\s+($Storage)\b/) {
5586 if ($line =~ /\b$Storage\b/ &&
5587 $line !~ /^.\s*$Storage/ &&
5588 $line =~ /^.\s*(.+?)\$Storage\s/ &&
5596 if ($line =~ /\b$Type\s+$Inline\b/ ||
5597 $line =~ /\b$Inline\s+$Storage\b/) {
5604 $line =~ /\b(__inline__|__inline)\b/) {
5615 $line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
5622 $line =~ /\b(__attribute__\s*\(\s*\(.*\bpacked|__packed)\b/) {
5629 $line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
5636 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
5647 $line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
5657 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
5658 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
5659 $line =~ /\b__weak\b/)) {
5667 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
5684 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
5704 if ($line =~ /\bsizeof\s*\(\s*\&/) {
5710 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
5719 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
5726 my $fmt = get_quoted_string($line, $rawline);
5866 $line =~ /\bsscanf\b/ &&
5883 $line =~ /\bsscanf\b/) {
5903 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
5989 if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) {
5997 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*([kv][mz]alloc(?:_node)?)\s*\(\s*(sizeof\s*\(\s…
6036 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*\1\s*,/) {
6042 if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) {
6048 if ($line =~ /;\s*;\s*$/) {
6058 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
6069 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(CONFIG_[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:\s*…
6079 if ($line =~ /^.\s*(?:case\s+(?:$Ident|$Constant)\s*|default):/) {
6118 if ($line =~ /\b__FUNCTION__\b/) {
6127 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
6133 if ($line =~ /\byield\s*\(\s*\)/) {
6139 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
6166 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
6172 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
6178 if ($line =~ /^.\s*__initcall\s*\(/) {
6185 if ($line !~ /\bconst\b/ &&
6186 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
6193 if ($line =~ /\bNR_CPUS\b/ &&
6194 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
6195 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
6196 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
6197 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
6198 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
6205 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
6212 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
6218 if ($line =~ /\bin_atomic\s*\(/) {
6230 $line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) {
6251 if ($line =~ /mutex_trylock_recursive/) {
6257 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
6258 $line =~ /__lockdep_no_validate__\s*\)/ ) {
6267 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
6268 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
6277 $line =~ /$mode_perms_search/) {
6312 if ($line =~ /\b$mode_perms_string_search\b/) {
6318 while ($line =~ /\b(($mode_perms_string_search)\b(?:\s*\|\s*)?\s*)/g) {
6319 $curpos = pos($line);
6340 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
6341 my $extracted_string = get_quoted_string($line, $rawline);