Lines Matching refs:line
370 my ($line) = @_;
373 $line =~ s/^.//;
374 $line = expand_tabs($line);
377 my ($white) = ($line =~ /^(\s*)/);
379 return (length($line), length($white));
394 my ($line) = @_;
404 $res = substr($line, 0, 1);
406 for ($off = 1; $off < length($line); $off++) {
407 $c = substr($line, $off, 1);
411 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
418 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
424 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
483 my $line = $linenr - 1;
506 for (; $remain > 0; $line++) {
507 last if (!defined $lines[$line]);
508 next if ($lines[$line] =~ /^-/);
511 $blk .= $lines[$line] . "\n";
513 $line++;
588 $line++;
601 $line, $remain + 1, $off - $loff + 1, $level);
678 my $line;
687 for ($line = $start; $remain > 0; $line++) {
688 next if ($rawlines[$line] =~ /^-/);
691 $blk .= $rawlines[$line];
694 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
696 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
698 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
702 foreach my $c (split(//, $lines[$line])) {
718 push(@res, $rawlines[$line]);
767 my $line = $rawlines[$linenr - 1];
769 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
772 if ($line =~ m@/\*@) {
778 $current_comment .= $line . "\n" if ($in_comment);
779 if ($line =~ m@\*/@) {
803 my $line;
805 $line = $rawlines[$offset++];
806 next if (defined($line) && $line =~ /^-/);
810 return $line;
1043 my ($possible, $line) = @_;
1061 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1072 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1078 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1083 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
1093 my $line = $prefix . $_[0];
1095 $line = (split('\n', $line))[0] . "\n" if ($terse);
1097 push(our @report, $line);
1198 my $line;
1201 $line = $rawline;
1256 $line = sanitise_line($rawline);
1258 push(@lines, $line);
1261 $realcnt-- if ($line =~ /^(?:\+| |$)/);
1269 if ($setup_docs && $line =~ /^\+/) {
1270 push(@setup_docs, $line);
1278 foreach my $line (@lines) {
1284 if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) {
1304 } elsif ($line =~ /^( |\+|$)/) {
1312 ($prevline, $stashline) = ($stashline, $line);
1332 if ($line =~ /^diff --git.*?(\S+)$/) {
1336 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
1361 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
1369 if ($line =~ /^\s*signed-off-by:/i) {
1372 if (!($line =~ /^\s*Signed-off-by:/)) {
1376 if ($line =~ /^\s*signed-off-by:\S/i) {
1383 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
1390 while ($line =~ m{(?:^|\s)(/\S*)}g) {
1403 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
1415 next if (!$hunk_line || $line =~ /^-/);
1418 if ($line =~ /^\+.*\015/) {
1432 $line =~ /\+\s*(?:---)?help(?:---)?$/) {
1463 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
1465 … !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ ||
1466 $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
1478 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
1484 if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) {
1485 my $herevet = "$here\n" . cat_vet($line) . "\n";
1488 if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) {
1489 my $herevet = "$here\n" . cat_vet($line) . "\n";
1517 if ($rawline =~ /^\+ / && $line !~ /\+ *(?:$;|#|$Ident:)/) {
1531 if ($line =~ /__builtin_bfin_csync/) {
1532 my $herevet = "$here\n" . cat_vet($line) . "\n";
1535 if ($line =~ /__builtin_bfin_ssync/) {
1536 my $herevet = "$here\n" . cat_vet($line) . "\n";
1543 if ($realcnt && $line =~ /.\s*\S/) {
1610 if ($line=~/\bswitch\s*\(.*\)/) {
1632 if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
1670 …if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) {
1756 my $opline = $line; $opline =~ s/^./ /;
1769 if ($line=~/^[^\+]/) {next;}
1773 if ($line =~ /^.\s*$Declare\s*$/) {
1775 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
1782 if ($line =~ /^.\s*$Modifier\s*$/) {
1784 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
1791 if ($line =~ /^.\s*{/ &&
1810 if ($line =~ m{//}) {
1814 $line =~ s@//.*@@;
1851 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
1852 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
1862 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
1867 if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) {
1873 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
1879 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
1885 if ($line =~ /\bstruct\s+pci_device_id\s+\w+\s*\[\s*\]\s*\=\s*\{/) {
1891 if ($line =~ /\btypedef\s/ &&
1892 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
1893 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
1894 $line !~ /\b$typeTypedefs\b/ &&
1895 $line !~ /\b__bitwise(?:__|)\b/) {
1901 if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}) {
1916 } elsif ($line =~ m{\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident)}) {
1942 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
1947 if ($line =~ /\bprintk_ratelimit\s*\(/) {
1956 if ($line =~ /\bprintk\((?!KERN_)\s*"/) {
1976 if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
1977 !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
1982 if ($line =~ /^.\s*{/ &&
1988 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) {
1996 while ($line =~ /(.*?\s)\[/g) {
2006 while ($line =~ /($Ident)\s+\(/g) {
2008 my $ctx_before = substr($line, 0, $-[1]);
2036 if (!($line=~/\#\s*include/)) {
2207 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
2227 if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
2228 $line =~ /do{/) {
2234 if ($line =~ /}(?!(?:,|;|\)))\S/) {
2239 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
2242 if ($line =~ /\s\]/) {
2247 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
2248 $line !~ /for\s*\(\s+;/) {
2251 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
2252 $line !~ /for\s*\(.*;\s+\)/ &&
2253 $line !~ /:\s+\)/) {
2258 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
2259 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
2286 if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) {
2294 if ($line=~/\b(if|while|for|switch)\(/) {
2300 if ($line =~ /do\s*(?!{)/) {
2319 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
2350 if ($line =~ /
2365 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
2373 if ($line =~ /}\s*if\b/) {
2378 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
2379 $line !~ /\G(?:
2389 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and
2394 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and
2416 if ($line=~/\#\s*define.*\\\s$/) {
2440 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
2535 if ($realfile eq 'vmlinux.lds.h' && $line =~ /(?:(?:^|\s)$Ident\s*=|=\s*$Ident(?:\s|$))/) {
2540 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
2589 $line =~ /\b(if|while|for|else)\b/) {
2593 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
2651 if ($line =~ /\b$func\b/) {
2658 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
2663 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
2671 if ($line =~ /\bkfree\(\Q$expr\E\);/) {
2678 if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
2684 if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) {
2687 … CHK("usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
2692 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
2694 …ARN("msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
2706 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
2711 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
2712 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
2719 …if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\…
2725 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
2730 if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
2736 if ($line =~ /\b$Type\s+$Inline\b/ ||
2737 $line =~ /\b$Inline\s+$Storage\b/) {
2742 if ($line =~ /\b(__inline__|__inline)\b/) {
2747 if ($line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
2752 if ($line =~ /\bsizeof\s*\(\s*\&/) {
2798 if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) {
2803 if ($line =~ /;\s*;\s*$/) {
2808 if ($line =~ /__FUNCTION__/) {
2813 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
2818 if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
2822 if ($line =~ /^.\s*__initcall\s*\(/) {
2863 if ($line !~ /\bconst\b/ &&
2864 $line =~ /\bstruct\s+($struct_ops)\b/) {
2871 if ($line =~ /\bNR_CPUS\b/ &&
2872 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
2873 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
2874 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
2875 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
2876 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
2883 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
2893 if ($line =~ /\bin_atomic\s*\(/) {
2902 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
2903 $line =~ /__lockdep_no_validate__\s*\)/ ) {
2911 if ($line =~ /debugfs_create_file.*S_IWUGO/ ||
2912 $line =~ /DEVICE_ATTR.*S_IWUGO/ ) {
2917 if ($line =~ /memset.*\,(\ |)(0x|)0(\ |0|)\);/) {