Lines Matching refs:line

247 		my $line = $_;
249 $line =~ s/\s*\n?$//g;
250 $line =~ s/^\s*//g;
251 $line =~ s/\s+/ /g;
253 next if ($line =~ m/^\s*#/);
254 next if ($line =~ m/^\s*$/);
256 my @words = split(" ", $line);
276 my $line = $_;
277 $line =~ s/\s+$//;
279 if ($line =~ /^\s*\*\*(.+)\*\*$/) {
287 if ($line =~ /^(?:\s{4,}|$)/) {
288 $line =~ s/^\s{4}//;
289 $desc .= $line;
956 my $line = $_;
958 $line =~ s/\s*\n?$//g;
959 $line =~ s/^\s*//g;
961 next if ($line =~ m/^\s*#/);
962 next if ($line =~ m/^\s*$/);
964 my ($suspect, $fix) = split(/\|\|/, $line);
976 my $line = $_;
978 $line =~ s/\s*\n?$//g;
979 $line =~ s/^\s*//g;
981 next if ($line =~ m/^\s*#/);
982 next if ($line =~ m/^\s*$/);
983 next if ($line =~ m/, disabled/i);
985 $line =~ s/,.*$//;
987 my ($suspect, $fix) = split(/->/, $line);
1004 my $line = $_;
1006 $line =~ s/\s*\n?$//g;
1007 $line =~ s/^\s*//g;
1009 next if ($line =~ m/^\s*#/);
1010 next if ($line =~ m/^\s*$/);
1011 if ($line =~ /\s/) {
1012 print("$file: '$line' invalid - ignored\n");
1017 $$wordsRef .= $line;
1141 foreach my $line (@lines) {
1142 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
1143 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
1145 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
1147 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1304 foreach my $line (split(/\n/, $lines)) {
1305 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1566 my ($line) = @_;
1569 $line =~ s/^.//;
1570 $line = expand_tabs($line);
1573 my ($white) = ($line =~ /^(\s*)/);
1575 return (length($line), length($white));
1590 my ($line) = @_;
1600 $res = substr($line, 0, 1);
1602 for ($off = 1; $off < length($line); $off++) {
1603 $c = substr($line, $off, 1);
1607 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1614 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1620 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1683 my ($line, $rawline) = @_;
1685 return "" if (!defined($line) || !defined($rawline));
1686 return "" if ($line !~ m/($String)/g);
1692 my $line = $linenr - 1;
1715 for (; $remain > 0; $line++) {
1716 last if (!defined $lines[$line]);
1717 next if ($lines[$line] =~ /^-/);
1720 $blk .= $lines[$line] . "\n";
1722 $line++;
1808 $line++;
1821 $line, $remain + 1, $off - $loff + 1, $level);
1898 my $line;
1907 for ($line = $start; $remain > 0; $line++) {
1908 next if ($rawlines[$line] =~ /^-/);
1911 $blk .= $rawlines[$line];
1914 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1916 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1918 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1922 foreach my $c (split(//, $lines[$line])) {
1938 push(@res, $rawlines[$line]);
1995 my $line = $rawlines[$linenr - 1];
1997 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
2000 if ($line =~ m@/\*@) {
2006 $current_comment .= $line . "\n" if ($in_comment);
2007 if ($line =~ m@\*/@) {
2031 my $line;
2033 $line = $rawlines[$offset++];
2034 next if (defined($line) && $line =~ /^-/);
2038 return $line;
2293 my ($possible, $line) = @_;
2313 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2324 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2330 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2335 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2432 my $line = $old_line; #don't modify the array
2433 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2435 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2437 fixup_current_range(\$line, $delta_offset, 0);
2454 push(@lines, $line);
2465 my ($linenr, $line) = @_;
2469 LINE => $line,
2475 my ($linenr, $line) = @_;
2479 LINE => $line,
2592 my ($line) = @_;
2596 my $opens = $line =~ tr/\(/\(/;
2597 my $closes = $line =~ tr/\)/\)/;
2605 my $len = length($line);
2608 my $string = substr($line, $pos);
2611 } elsif (substr($line, $pos, 1) eq '(') {
2618 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2622 my ($line, $rawline) = @_;
2625 for my $i (0 .. (length($line) - 1)) {
2626 if (substr($line, $i, 1) eq "$;") {
2726 my $line;
2729 $line = $rawline;
2786 $line = sanitise_line($rawline);
2788 push(@lines, $line);
2791 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2799 if ($setup_docs && $line =~ /^\+/) {
2800 push(@setup_docs, $line);
2809 foreach my $line (@lines) {
2812 my $sline = $line; #copy of $line
2816 my $raw_comment = get_raw_comment($line, $rawline);
2820 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2821 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2822 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2828 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2855 } elsif ($line =~ /^( |\+|$)/) {
2863 ($prevline, $stashline) = ($stashline, $line);
2880 if ($line =~ /^diff --git.*?(\S+)$/) {
2885 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2953 if ($line !~ /^\s*$/) {
2964 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2965 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2966 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2967 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2974 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2984 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2990 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2996 if ($line =~ /^\s*signed-off-by:\s*(.*)/i) {
3035 if ($line =~ /^---$/) {
3042 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
3048 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
3180 my $sig_nospace = $line;
3222 $line =~ /^This reverts commit/) {
3227 $line =~ /((?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller))/) {
3233 $line =~ /^\s*(fixes:?)\s*(?:commit\s*)?([0-9a-f]{5,40})(?:\s*($balanced_parens))?/i) {
3252 my $tag_space = not ($line =~ /^fixes:? [0-9a-f]{5,40} ($balanced_parens)/i);
3273 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
3279 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
3289 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
3290 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
3292 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
3293 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
3294 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
3301 length($line) > 75 &&
3302 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
3304 $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
3306 $line =~ /^\s*(?:Fixes:|https?:|$link_tags_search|$signature_tags)/i ||
3316 $line =~ /^\s*$/) {
3322 $line =~ /^\s*(\w+:)\s*http/ && $1 !~ /^$link_tags_search$/) {
3334 $line =~ /^\s*(\w+:)\s*(\S+)/) {
3344 if ($in_commit_log && $line =~ /^#/) {
3370 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
3371 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
3372 (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
3373 …($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,…
3374 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
3375 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
3376 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
3390 my $input = $line;
3391 if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
3432 $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
3443 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
3444 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
3445 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
3455 ($line =~ /^new file mode\s*\d+\s*$/) &&
3462 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
3469 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
3507 while ($line =~ m{(?:^|\s)(/\S*)}g) {
3521 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
3542 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
3607 next if (!$hunk_line || $line =~ /^-/);
3610 if ($line =~ /^\+.*\015/) {
3647 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3733 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3734 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3764 $line =~ /^\+\s*(phy-mode|phy-connection-type)\s*=\s*"/ &&
3767 my $mode = get_quoted_string($line, $rawline);
3840 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3861 if ($line =~ /^\+/ && $length > $max_line_length) {
3868 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3869 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3874 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3875 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3879 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3880 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3890 } elsif ($line =~ /($;[\s$;]*)$/ &&
3891 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3896 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3910 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3920 $line =~ /^\+\s*(?:[A-Z]+_)?SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) {
4002 $line =~ /^(\+| )([ \t]*)/;
4015 $fix && $line =~ /^\+/) {
4030 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
4061 $line =~ /^\+[ \t]*$;/ && #leading comment
4086 $line =~ /^\+/ &&
4087 !($line =~ /^\+\s*$/ ||
4088 $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param|ALLOW_ERROR_INJECTION)/ ||
4089 $line =~ /^\+\s*MODULE_/i ||
4090 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
4091 $line =~ /^\+[a-z_]*init/ ||
4092 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
4093 $line =~ /^\+\s*DECLARE/ ||
4094 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
4095 $line =~ /^\+\s*__setup/)) {
4105 $line =~ /^\+\s*$/ &&
4167 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
4180 if ($line =~ /^\+.*([\[\(])\s*$/) {
4231 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
4318 if ($line=~/\bswitch\s*\(.*\)/) {
4341 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
4346 if ($line =~ /^\+\t{6,}/) {
4387 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
4488 my $opline = $line; $opline =~ s/^./ /;
4501 next if ($line =~ /^[^\+]/);
4506 if ($line =~ /^\+\s*(?:$Declare)?([A-Za-z_][A-Za-z\d_]*)\s*=/) {
4508 …if ($line =~ /^\+\s*(?:$Declare)?$var\s*=\s*(?:$var|\*\s*\(?\s*&\s*\(?\s*$var\s*\)?\s*\)?)\s*[;,]/…
4516 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
4519 $line =~ /^.\s*($Lval)/;
4527 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
4552 if ($line =~ /^.\s*$Declare\s*$/) {
4555 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
4563 if ($line =~ /^.\s*$Modifier\s*$/) {
4566 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
4574 if ($line =~ /^.\s*{/ &&
4578 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4584 $fixedline = $line;
4608 if ($line =~ m{//}) {
4612 my $line = $fixed[$fixlinenr];
4613 if ($line =~ /\/\/(.*)$/) {
4620 $line =~ s@//.*@@;
4657 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/)) {
4668 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/ &&
4677 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4714 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4721 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4730 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4761 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4768 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4770 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4781 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4791 if ($line =~ /\btypedef\s/ &&
4792 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4793 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4794 $line !~ /\b$typeTypedefs\b/ &&
4795 $line !~ /\b__bitwise\b/) {
4802 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4827 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4857 …if ($line =~ /\b(?!AA_|BUILD_|IDA_|KVM_|RWLOCK_|snd_|SPIN_)(?:[a-zA-Z_]*_)?BUG(?:_ON)?(?:_[A-Z_]+)…
4865 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4871 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4877 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4883 if ($line =~ /\b(printk(_once|_ratelimited)?)\s*\(\s*KERN_([A-Z]+)/) {
4899 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4909 if ($line =~ /\b(trace_printk|trace_puts|ftrace_vprintk)\s*\(/) {
4917 if ($line =~ /\bENOSYS\b/) {
4925 if (!$file && $line =~ /\bENOTSUPP\b/) {
4956 if ($line =~ /^.\s*{/ &&
4960 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4974 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4986 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
5057 while ($line =~ /(.*?\s)\[/g) {
5072 while ($line =~ /($Ident)\s+\(/g) {
5074 my $ctx_before = substr($line, 0, $-[1]);
5107 if (!($line=~/\#\s*include/)) {
5418 if ($line =~ /^\+.*\S\s+;\s*$/) {
5428 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
5450 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
5451 $line =~ /\b(?:else|do)\{/) {
5469 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
5479 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
5487 if ($line =~ /\s\]/) {
5497 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
5498 $line !~ /for\s*\(\s+;/) {
5506 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
5507 $line !~ /for\s*\(.*;\s+\)/ &&
5508 $line !~ /:\s+\)/) {
5520 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
5532 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
5626 $line =~ /\bif\s*((?:\(\s*){2,})/) {
5630 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5643 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5677 if ($line =~ /\b(if|while|for|switch)\(/) {
5688 if ($line =~ /do\s*(?!{)/) {
5711 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5780 if ($line =~ /
5796 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5805 if ($line =~ /}\s*if\b/) {
5811 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5812 $line !~ /\G(?:
5823 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5827 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5841 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5853 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5867 while ($line =~ m{($Constant|$Lval)}g) {
5906 if ($line =~ /\#\s*define.*\\\s+$/) {
5940 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
6099 $line =~ s/(\w+)/$maybe_linker_symbol{$1}++/ge;
6103 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
6104 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
6105 $line =~ /^\+.*\\$/) {
6116 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
6156 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
6219 $line =~ /\b(if|while|for|else)\b/) {
6223 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
6276 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
6293 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
6302 if ($line =~ /^\+\s*$String/ &&
6310 my $extracted_string = get_quoted_string($line, $rawline);
6341 if ($line =~ /^\+.*$String/ &&
6343 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
6344 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
6371 if ($line =~ /$String[A-Z_]/ ||
6372 ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) {
6376 while ($line =~ /($String)/g) {
6385 if ($line =~ /$String\s*[Lu]?"/) {
6389 while ($line =~ /($String)(?=\s*")/g) {
6399 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
6428 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
6434 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
6443 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
6473 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
6491 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
6492 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
6502 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
6509 $line =~ /\b$logFunctions\s*\(/ &&
6531 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
6539 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
6552 if ($line =~ /(\b$InitAttribute\b)/) {
6554 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
6570 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
6584 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
6599 if ($line =~ /\b__read_mostly\b/ &&
6600 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
6610 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
6622 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
6636 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
6644 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
6650 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
6663 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
6674 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
6675 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
6703 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
6714 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
6715 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
6721 if ($line =~ /\bwaitqueue_active\s*\(/) {
6729 if ($line =~ /\bdata_race\s*\(/) {
6737 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6743 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6748 if ($line =~ /\b$Storage\b/ &&
6749 $line !~ /^.\s*$Storage/ &&
6750 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6758 if ($line =~ /\b$Type\s+$Inline\b/ ||
6759 $line =~ /\b$Inline\s+$Storage\b/) {
6766 $line =~ /\b(__inline__|__inline)\b/) {
6842 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6843 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6844 $line =~ /\b__weak\b/)) {
6852 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6869 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6889 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6895 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6904 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6911 my $fmt = get_quoted_string($line, $rawline);
7038 if ($line =~ /\bstrcpy\s*\(/ && !is_userspace($realfile)) {
7044 if ($line =~ /\bstrlcpy\s*\(/ && !is_userspace($realfile)) {
7050 if ($line =~ /\bstrncpy\s*\(/ && !is_userspace($realfile)) {
7056 if ($line =~ /\bethtool_sprintf\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) {
7117 $line =~ /\bsscanf\b/ &&
7131 $line =~ /\bsscanf\b/) {
7148 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
7248 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
7256 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
7294 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
7301 if ($line =~ /\b((?:devm_)?((?:k|kv)?(calloc|malloc_array)(?:_node)?))\s*\(\s*sizeof\b/) {
7307 if ($line =~ /;\s*;\s*$/) {
7317 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
7334 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:…
7377 if ($line =~ /\b__FUNCTION__\b/) {
7386 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
7392 if ($line =~ /\byield\s*\(\s*\)/) {
7398 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
7425 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
7431 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
7437 if ($line =~ /^.\s*__initcall\s*\(/) {
7443 if ($line =~ /\bspin_is_locked\(/) {
7449 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
7459 $line !~ /\bconst\b/ &&
7460 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
7468 if ($line =~ /\bNR_CPUS\b/ &&
7469 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
7470 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
7471 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
7472 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
7473 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/ &&
7474 $line !~ /^.\s*\.\w+\s*=\s*.*\bNR_CPUS\b/)
7481 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
7488 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
7494 if ($line =~ /\breturn\s+sysfs_emit\s*\(\s*$FuncArg\s*,\s*($String)/ &&
7515 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
7521 if ($line =~ /\bin_atomic\s*\(/) {
7548 if ($line =~ /\b($rcu_trace_funcs)\s*\(/) {
7556 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
7557 $line =~ /__lockdep_no_validate__\s*\)/ ) {
7566 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
7567 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
7637 $line =~ /$mode_perms_search/) {
7670 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
7681 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
7682 my $extracted_string = get_quoted_string($line, $rawline);
7706 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {
7712 if (defined $stat && $line =~ /struct\s+$dev_id_types\s+\w+\s*\[\s*\]\s*=\s*\{/) {
7737 while ($line =~ /\*\s*($Ident)\s+__free\s*\(\s*$Ident\s*\)\s*[,;]/g) {