Lines Matching refs:line
229 my $line = $_;
231 $line =~ s/\s*\n?$//g;
232 $line =~ s/^\s*//g;
233 $line =~ s/\s+/ /g;
235 next if ($line =~ m/^\s*#/);
236 next if ($line =~ m/^\s*$/);
238 my @words = split(" ", $line);
258 my $line = $_;
259 $line =~ s/\s+$//;
261 if ($line =~ /^\s*\*\*(.+)\*\*$/) {
269 if ($line =~ /^(?:\s{4,}|$)/) {
270 $line =~ s/^\s{4}//;
271 $desc .= $line;
931 my $line = $_;
933 $line =~ s/\s*\n?$//g;
934 $line =~ s/^\s*//g;
936 next if ($line =~ m/^\s*#/);
937 next if ($line =~ m/^\s*$/);
939 my ($suspect, $fix) = split(/\|\|/, $line);
951 my $line = $_;
953 $line =~ s/\s*\n?$//g;
954 $line =~ s/^\s*//g;
956 next if ($line =~ m/^\s*#/);
957 next if ($line =~ m/^\s*$/);
958 next if ($line =~ m/, disabled/i);
960 $line =~ s/,.*$//;
962 my ($suspect, $fix) = split(/->/, $line);
979 my $line = $_;
981 $line =~ s/\s*\n?$//g;
982 $line =~ s/^\s*//g;
984 next if ($line =~ m/^\s*#/);
985 next if ($line =~ m/^\s*$/);
986 if ($line =~ /\s/) {
987 print("$file: '$line' invalid - ignored\n");
992 $$wordsRef .= $line;
1116 foreach my $line (@lines) {
1117 next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/);
1118 if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) {
1120 } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) {
1122 } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) {
1279 foreach my $line (split(/\n/, $lines)) {
1280 $line =~ /^([0-9a-fA-F]{40,40}) (.*)$/;
1541 my ($line) = @_;
1544 $line =~ s/^.//;
1545 $line = expand_tabs($line);
1548 my ($white) = ($line =~ /^(\s*)/);
1550 return (length($line), length($white));
1565 my ($line) = @_;
1575 $res = substr($line, 0, 1);
1577 for ($off = 1; $off < length($line); $off++) {
1578 $c = substr($line, $off, 1);
1582 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
1589 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
1595 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
1658 my ($line, $rawline) = @_;
1660 return "" if (!defined($line) || !defined($rawline));
1661 return "" if ($line !~ m/($String)/g);
1667 my $line = $linenr - 1;
1690 for (; $remain > 0; $line++) {
1691 last if (!defined $lines[$line]);
1692 next if ($lines[$line] =~ /^-/);
1695 $blk .= $lines[$line] . "\n";
1697 $line++;
1783 $line++;
1796 $line, $remain + 1, $off - $loff + 1, $level);
1873 my $line;
1882 for ($line = $start; $remain > 0; $line++) {
1883 next if ($rawlines[$line] =~ /^-/);
1886 $blk .= $rawlines[$line];
1889 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
1891 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
1893 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
1897 foreach my $c (split(//, $lines[$line])) {
1913 push(@res, $rawlines[$line]);
1970 my $line = $rawlines[$linenr - 1];
1972 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
1975 if ($line =~ m@/\*@) {
1981 $current_comment .= $line . "\n" if ($in_comment);
1982 if ($line =~ m@\*/@) {
2006 my $line;
2008 $line = $rawlines[$offset++];
2009 next if (defined($line) && $line =~ /^-/);
2013 return $line;
2268 my ($possible, $line) = @_;
2288 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
2299 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
2305 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
2310 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
2407 my $line = $old_line; #don't modify the array
2408 if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename
2410 } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk
2412 fixup_current_range(\$line, $delta_offset, 0);
2429 push(@lines, $line);
2440 my ($linenr, $line) = @_;
2444 LINE => $line,
2450 my ($linenr, $line) = @_;
2454 LINE => $line,
2567 my ($line) = @_;
2571 my $opens = $line =~ tr/\(/\(/;
2572 my $closes = $line =~ tr/\)/\)/;
2580 my $len = length($line);
2583 my $string = substr($line, $pos);
2586 } elsif (substr($line, $pos, 1) eq '(') {
2593 return length(expand_tabs(substr($line, 0, $last_openparen))) + 1;
2597 my ($line, $rawline) = @_;
2600 for my $i (0 .. (length($line) - 1)) {
2601 if (substr($line, $i, 1) eq "$;") {
2696 my $line;
2699 $line = $rawline;
2756 $line = sanitise_line($rawline);
2758 push(@lines, $line);
2761 $realcnt-- if ($line =~ /^(?:\+| |$)/);
2769 if ($setup_docs && $line =~ /^\+/) {
2770 push(@setup_docs, $line);
2779 foreach my $line (@lines) {
2782 my $sline = $line; #copy of $line
2786 my $raw_comment = get_raw_comment($line, $rawline);
2790 ($line =~ /^ mode change [0-7]+ => [0-7]+ \S+\s*$/ ||
2791 ($line =~ /^rename (?:from|to) \S+\s*$/ ||
2792 $line =~ /^diff --git a\/[\w\/\.\_\-]+ b\/\S+\s*$/))) {
2798 $line =~ /^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@(.*)/) {
2825 } elsif ($line =~ /^( |\+|$)/) {
2833 ($prevline, $stashline) = ($stashline, $line);
2850 if ($line =~ /^diff --git.*?(\S+)$/) {
2855 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
2923 if ($line !~ /^\s*$/) {
2934 (($line =~ m@^\s+diff\b.*a/([\w/]+)@ &&
2935 $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) ||
2936 $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ ||
2937 $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) {
2944 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
2954 if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
2960 $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
2966 if ($line =~ /^\s*signed-off-by:\s*(.*)/i) {
3005 if ($line =~ /^---$/) {
3012 if ($line =~ /^\s*MAINTAINERS\s*\|/) {
3018 $line =~ /^(\s*)([a-z0-9_-]+by:|$signature_tags)(\s*)(.*)/i) {
3150 my $sig_nospace = $line;
3192 $line =~ /^This reverts commit/) {
3197 $line =~ /((?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller))/) {
3203 $line =~ /^\s*(fixes:?)\s*(?:commit\s*)?([0-9a-f]{5,40})(?:\s*($balanced_parens))?/i) {
3222 my $tag_space = not ($line =~ /^fixes:? [0-9a-f]{5,40} ($balanced_parens)/i);
3243 $line =~ /^Subject:.*\b(?:checkpatch|sparse|smatch)\b[^:]/i) {
3249 if ($realfile eq '' && !$has_patch_separator && $line =~ /^\s*change-id:/i) {
3259 ($line =~ /^\s*(?:WARNING:|BUG:)/ ||
3260 $line =~ /^\s*\[\s*\d+\.\d{6,6}\s*\]/ ||
3262 $line =~ /^\s*\[\<[0-9a-fA-F]{8,}\>\]/) ||
3263 $line =~ /^(?:\s+\w+:\s+[0-9a-fA-F]+){3,3}/ ||
3264 $line =~ /^\s*\#\d+\s*\[[0-9a-fA-F]+\]\s*\w+ at [0-9a-fA-F]+/) {
3271 length($line) > 75 &&
3272 !($line =~ /^\s*[a-zA-Z0-9_\/\.]+\s+\|\s+\d+/ ||
3274 $line =~ /^\s*(?:[\w\.\-\+]*\/)++[\w\.\-\+]+:/ ||
3276 $line =~ /^\s*(?:Fixes:|$link_tags_search|$signature_tags)/i ||
3286 $line =~ /^\s*$/) {
3292 $line =~ /^\s*(\w+:)\s*http/ && $1 !~ /^$link_tags_search$/) {
3304 $line =~ /^\s*(\w+:)\s*(\S+)/) {
3314 if ($in_commit_log && $line =~ /^#/) {
3333 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
3334 $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
3335 (($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
3336 …($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,…
3337 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
3338 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&
3339 $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) {
3353 my $input = $line;
3354 if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
3395 $last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
3406 ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
3407 $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ ||
3408 ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ &&
3418 ($line =~ /^new file mode\s*\d+\s*$/) &&
3425 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
3432 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
3470 while ($line =~ m{(?:^|\s)(/\S*)}g) {
3484 ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
3504 if ($in_commit_log && $line =~ /(^fixes:|\bcommit)\s+([0-9a-f]{6,40})\b/i) {
3569 next if (!$hunk_line || $line =~ /^-/);
3572 if ($line =~ /^\+.*\015/) {
3609 $line =~ /^\+\s*(?:config|menuconfig|choice)\b/) {
3695 (($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
3696 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
3790 substr($line, @-, @+ - @-) eq "$;" x (@+ - @-)) {
3811 if ($line =~ /^\+/ && $length > $max_line_length) {
3818 …if ($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(?:KERN_\S+\s*|[^"]*))?($String\s*(?:|,|\)\s*;)\s*)$/ …
3819 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3824 } elsif ($line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ ||
3825 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
3829 } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
3830 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
3840 } elsif ($line =~ /($;[\s$;]*)$/ &&
3841 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3846 length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) {
3860 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
3870 $line =~ /^\+\s*(?:[A-Z]+_)?SYM_[A-Z]+_(?:START|END)(?:_[A-Z_]+)?\s*\(\s*\.L/) {
3952 $line =~ /^(\+| )([ \t]*)/;
3965 $fix && $line =~ /^\+/) {
3980 if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ &&
4011 $line =~ /^\+[ \t]*$;/ && #leading comment
4036 $line =~ /^\+/ &&
4037 !($line =~ /^\+\s*$/ ||
4038 $line =~ /^\+\s*(?:EXPORT_SYMBOL|early_param|ALLOW_ERROR_INJECTION)/ ||
4039 $line =~ /^\+\s*MODULE_/i ||
4040 $line =~ /^\+\s*\#\s*(?:end|elif|else)/ ||
4041 $line =~ /^\+[a-z_]*init/ ||
4042 $line =~ /^\+\s*(?:static\s+)?[A-Z_]*ATTR/ ||
4043 $line =~ /^\+\s*DECLARE/ ||
4044 $line =~ /^\+\s*builtin_[\w_]*driver/ ||
4045 $line =~ /^\+\s*__setup/)) {
4055 $line =~ /^\+\s*$/ &&
4117 if ($rawline =~ /^\+ / && $line !~ /^\+ *(?:$;|#|$Ident:)/) {
4130 if ($line =~ /^\+.*([\[\(])\s*$/) {
4181 if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
4268 if ($line=~/\bswitch\s*\(.*\)/) {
4291 …if ($line =~ /(.*)\b((?:if|while|for|switch|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|do\b|else\b)/ && $li…
4296 if ($line =~ /^\+\t{6,}/) {
4337 …if ($line =~ /\b(?:(?:if|while|for|(?:[a-z_]+|)for_each[a-z_]+)\s*\(|(?:do|else)\b)/ && $line !~ /…
4438 my $opline = $line; $opline =~ s/^./ /;
4451 next if ($line =~ /^[^\+]/);
4456 if ($line =~ /^\+\s*(?:$Declare)?([A-Za-z_][A-Za-z\d_]*)\s*=/) {
4458 …if ($line =~ /^\+\s*(?:$Declare)?$var\s*=\s*(?:$var|\*\s*\(?\s*&\s*\(?\s*$var\s*\)?\s*\)?)\s*[;,]/…
4466 $line =~ /^\+\s*(?!\#\s*(?!define\s+|if))\s*$Lval/) {
4469 $line =~ /^.\s*($Lval)/;
4477 while ($line =~ m{\b($Declare)\s*(?!char\b|short\b|int\b|long\b)\s*($Ident)?\s*[=,;\[\)\(]}g) {
4502 if ($line =~ /^.\s*$Declare\s*$/) {
4505 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
4513 if ($line =~ /^.\s*$Modifier\s*$/) {
4516 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
4524 if ($line =~ /^.\s*{/ &&
4528 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4534 $fixedline = $line;
4558 if ($line =~ m{//}) {
4562 my $line = $fixed[$fixlinenr];
4563 if ($line =~ /\/\/(.*)$/) {
4570 $line =~ s@//.*@@;
4607 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/)) {
4618 if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*($zero_initializer)\s*;/ &&
4627 if ($line =~ /^\+.*\bstatic\s.*=\s*($zero_initializer)\s*;/) {
4664 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
4671 …if ($line =~ /^\+\s*const\s+(char|unsigned\s+char|_*u8|(?:[us]_)?int8_t)\s+\w+\s*\[\s*(?:\w+\s*)?\…
4680 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
4711 if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) {
4718 if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) {
4720 …if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))…
4731 if ($line =~ /(\b$Type\s*$Ident)\s*\(\s*\)/) {
4741 if ($line =~ /\btypedef\s/ &&
4742 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
4743 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
4744 $line !~ /\b$typeTypedefs\b/ &&
4745 $line !~ /\b__bitwise\b/) {
4752 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
4777 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
4807 …if ($line =~ /\b(?!AA_|BUILD_|DCCP_|IDA_|KVM_|RWLOCK_|snd_|SPIN_)(?:[a-zA-Z_]*_)?BUG(?:_ON)?(?:_[A…
4815 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
4821 if ($line =~ /\bprintk_ratelimit\s*\(/) {
4827 if ($line =~ /\bprintk\s*\(\s*(?!KERN_[A-Z]+\b)/) {
4833 if ($line =~ /\b(printk(_once|_ratelimited)?)\s*\(\s*KERN_([A-Z]+)/) {
4849 if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) {
4859 if ($line =~ /\b(trace_printk|trace_puts|ftrace_vprintk)\s*\(/) {
4867 if ($line =~ /\bENOSYS\b/) {
4875 if (!$file && $line =~ /\bENOTSUPP\b/) {
4906 if ($line =~ /^.\s*{/ &&
4910 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
4924 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident){1,2}[=\{]/) {
4936 if ($line =~ /^.\s*($Declare)\((\s*)\*(\s*)($Ident)(\s*)\)(\s*)\(/) {
5007 while ($line =~ /(.*?\s)\[/g) {
5022 while ($line =~ /($Ident)\s+\(/g) {
5024 my $ctx_before = substr($line, 0, $-[1]);
5057 if (!($line=~/\#\s*include/)) {
5368 if ($line =~ /^\+.*\S\s+;\s*$/) {
5378 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
5400 if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
5401 $line =~ /\b(?:else|do)\{/) {
5419 if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
5429 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
5437 if ($line =~ /\s\]/) {
5447 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
5448 $line !~ /for\s*\(\s+;/) {
5456 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
5457 $line !~ /for\s*\(.*;\s+\)/ &&
5458 $line !~ /:\s+\)/) {
5470 while ($line =~ /(?:[^&]&\s*|\*)\(\s*($Ident\s*(?:$Member\s*)+)\s*\)/g) {
5482 if ($line =~ /(\bif\s*|)(\(\s*$Ident\s*(?:$Member\s*)+\))[ \t]*\(/ && $1 !~ /^if/) {
5576 $line =~ /\bif\s*((?:\(\s*){2,})/) {
5580 …if ($line =~ /\bif\s*(?:\(\s*){$count,$count}$LvalOrFunc\s*($Compare)\s*$LvalOrFunc(?:\s*\)){$coun…
5593 $line =~ /^\+(.*)\b($Constant|[A-Z_][A-Z0-9_]*)\s*($Compare)\s*($LvalOrFunc)/) {
5627 if ($line =~ /\b(if|while|for|switch)\(/) {
5638 if ($line =~ /do\s*(?!{)/) {
5661 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
5730 if ($line =~ /
5746 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
5755 if ($line =~ /}\s*if\b/) {
5761 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
5762 $line !~ /\G(?:
5773 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ &&
5777 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5791 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ &&
5803 $fix && $prevline =~ /^\+/ && $line =~ /^\+/) {
5817 while ($line =~ m{($Constant|$Lval)}g) {
5856 if ($line =~ /\#\s*define.*\\\s+$/) {
5890 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
6046 $line =~ s/(\w+)/$maybe_linker_symbol{$1}++/ge;
6050 $line !~ /^\+\s*\#.*\\$/ && # preprocessor
6051 $line !~ /^\+.*\b(__asm__|asm)\b.*\\$/ && # asm
6052 $line =~ /^\+.*\\$/) {
6063 $line =~ /^.\s*\#\s*define\s+$Ident(\()?/) {
6103 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
6166 $line =~ /\b(if|while|for|else)\b/) {
6170 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
6223 if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) {
6240 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
6249 if ($line =~ /^\+\s*$String/ &&
6257 my $extracted_string = get_quoted_string($line, $rawline);
6288 if ($line =~ /^\+.*$String/ &&
6290 get_quoted_string($line, $rawline) =~ /\b$context_function\b/ &&
6291 length(get_quoted_string($line, $rawline)) != (length($context_function) + 2)) {
6318 if ($line =~ /$String[A-Z_]/ ||
6319 ($line =~ /([A-Za-z0-9_]+)$String/ && $1 !~ /^[Lu]$/)) {
6323 while ($line =~ /($String)/g) {
6332 if ($line =~ /$String\s*[Lu]?"/) {
6336 while ($line =~ /($String)(?=\s*")/g) {
6346 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
6375 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
6381 if ($line =~ /^.\s*\#\s*if\s+1\b/) {
6390 …if ($line =~ /\b(kfree|usb_free_urb|debugfs_remove(?:_recursive)?|(?:kmem_cache|mempool|dma_pool)_…
6420 if ($line =~ /^\+.*\b$logFunctions\s*\(/ &&
6438 if ($line !~ /printk(?:_ratelimited|_once)?\s*\(/ &&
6439 $line =~ /\b$logFunctions\s*\(.*\b(KERN_[A-Z]+)\b/) {
6449 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
6456 $line =~ /\b$logFunctions\s*\(/ &&
6478 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&
6486 while ($line =~ /\b$LvalOrFunc\s*(==|\!=)\s*NULL\b/g) {
6499 if ($line =~ /(\b$InitAttribute\b)/) {
6501 …if ($line =~ /^\+\s*static\s+(?:const\s+)?(?:$attr\s+)?($NonptrTypeWithAttr)\s+(?:$attr\s+)?($Iden…
6517 if ($line =~ /\bconst\b/ && $line =~ /($InitAttributeData)/) {
6531 if ($line !~ /\bconst\b/ && $line =~ /($InitAttributeConst)/) {
6546 if ($line =~ /\b__read_mostly\b/ &&
6547 $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) {
6557 … $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) {
6569 if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
6583 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
6591 if ($line =~ /\bjiffies\s*$Compare|$Compare\s*jiffies\b/) {
6597 if ($line =~ /\bget_jiffies_64\s*\(\s*\)\s*$Compare|$Compare\s*get_jiffies_64\s*\(\s*\)/) {
6610 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
6621 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
6622 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
6650 if ($line =~ /\b(?:$all_barriers)\s*\(/) {
6661 $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
6662 $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
6668 if ($line =~ /\bwaitqueue_active\s*\(/) {
6676 if ($line =~ /\bdata_race\s*\(/) {
6684 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
6690 if ($line =~ /\b($Type)\s+($Storage)\b/) {
6695 if ($line =~ /\b$Storage\b/ &&
6696 $line !~ /^.\s*$Storage/ &&
6697 $line =~ /^.\s*(.+?)\$Storage\s/ &&
6705 if ($line =~ /\b$Type\s+$Inline\b/ ||
6706 $line =~ /\b$Inline\s+$Storage\b/) {
6713 $line =~ /\b(__inline__|__inline)\b/) {
6789 … $line =~ /(?:$Declare|$DeclareMisordered)\s*$Ident\s*$balanced_parens\s*(?:$Attribute)?\s*;/ &&
6790 ($line =~ /\b__attribute__\s*\(\s*\(.*\bweak\b/ ||
6791 $line =~ /\b__weak\b/)) {
6799 $line =~ /\b($Declare)\s*$Ident\s*[=;,\[]/) {
6816 if ($line =~ /(\(\s*$C90_int_types\s*\)\s*)($Constant)\b/) {
6836 if ($line =~ /\bsizeof\s*\(\s*\&/) {
6842 if ($line =~ /\bsizeof\s+((?:\*\s*|)$Lval|$Type(?:\s+$Lval|))/) {
6851 if ($line =~ /^.\s*\bstruct\s+spinlock\s+\w+\s*;/) {
6858 my $fmt = get_quoted_string($line, $rawline);
6986 if ($line =~ /\bstrcpy\s*\(/) {
6992 if ($line =~ /\bstrlcpy\s*\(/) {
6998 if ($line =~ /\bstrncpy\s*\(/) {
7004 if ($line =~ /\bethtool_sprintf\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\)/) {
7065 $line =~ /\bsscanf\b/ &&
7079 $line =~ /\bsscanf\b/) {
7096 $line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\(/s) {
7196 if ($line =~ /\*\s*\)\s*$allocFunctions\b/) {
7204 …$line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*((?:kv|k|v)[mz]alloc(?:_node)?)\s*\(\s*(sizeof\…
7242 $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*krealloc\s*\(\s*($Lval)\s*,/ &&
7249 if ($line =~ /\b((?:devm_)?((?:k|kv)?(calloc|malloc_array)(?:_node)?))\s*\(\s*sizeof\b/) {
7255 if ($line =~ /;\s*;\s*$/) {
7265 $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) {
7282 …if ($line =~ /^\+\s*#\s*if\s+defined(?:\s*\(?\s*|\s+)(${CONFIG_}[A-Z_]+)\s*\)?\s*\|\|\s*defined(?:…
7325 if ($line =~ /\b__FUNCTION__\b/) {
7334 while ($line =~ /\b(__(?:DATE|TIME|TIMESTAMP)__)\b/g) {
7340 if ($line =~ /\byield\s*\(\s*\)/) {
7346 if ($line =~ /\+\s*(.*?)\b(true|false|$Lval)\s*(==|\!=)\s*(true|false|$Lval)\b(.*)$/i) {
7373 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
7379 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
7385 if ($line =~ /^.\s*__initcall\s*\(/) {
7391 if ($line =~ /\bspin_is_locked\(/) {
7397 if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
7407 $line !~ /\bconst\b/ &&
7408 $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
7416 if ($line =~ /\bNR_CPUS\b/ &&
7417 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
7418 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
7419 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
7420 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
7421 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/ &&
7422 $line !~ /^.\s*\.\w+\s*=\s*.*\bNR_CPUS\b/)
7429 if ($line =~ /\+\s*#\s*define\s+((?:__)?ARCH_(?:HAS|HAVE)\w*)\b/) {
7436 $line =~ /\b((?:un)?likely)\s*\(\s*$FuncArg\s*\)\s*$Compare/) {
7442 if ($line =~ /\breturn\s+sysfs_emit\s*\(\s*$FuncArg\s*,\s*($String)/ &&
7463 if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
7469 if ($line =~ /\bin_atomic\s*\(/) {
7496 if ($line =~ /\b($rcu_trace_funcs)\s*\(/) {
7504 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
7505 $line =~ /__lockdep_no_validate__\s*\)/ ) {
7514 if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ ||
7515 $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) {
7585 $line =~ /$mode_perms_search/) {
7618 while ($line =~ m{\b($multi_mode_perms_string_search)\b}g) {
7629 if ($line =~ /\bMODULE_LICENSE\s*\(\s*($String)\s*\)/) {
7630 my $extracted_string = get_quoted_string($line, $rawline);
7654 if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {