• Home
  • Raw
  • Download

Lines Matching refs:line

79 		my $line = $_;
81 $line =~ s/\s*\n?$//g;
82 $line =~ s/^\s*//g;
83 $line =~ s/\s+/ /g;
85 next if ($line =~ m/^\s*#/);
86 next if ($line =~ m/^\s*$/);
88 my @words = split(" ", $line);
534 my ($line) = @_;
537 $line =~ s/^.//;
538 $line = expand_tabs($line);
541 my ($white) = ($line =~ /^(\s*)/);
543 return (length($line), length($white));
558 my ($line) = @_;
568 $res = substr($line, 0, 1);
570 for ($off = 1; $off < length($line); $off++) {
571 $c = substr($line, $off, 1);
575 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '/*') {
582 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
588 if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') {
647 my $line = $linenr - 1;
670 for (; $remain > 0; $line++) {
671 last if (!defined $lines[$line]);
672 next if ($lines[$line] =~ /^-/);
675 $blk .= $lines[$line] . "\n";
677 $line++;
763 $line++;
776 $line, $remain + 1, $off - $loff + 1, $level);
853 my $line;
862 for ($line = $start; $remain > 0; $line++) {
863 next if ($rawlines[$line] =~ /^-/);
866 $blk .= $rawlines[$line];
869 if ($lines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|if)\s/) {
871 } elsif ($lines[$line] =~ /^.\s*#\s*(?:else|elif)\b/) {
873 } elsif ($lines[$line] =~ /^.\s*#\s*endif\b/) {
877 foreach my $c (split(//, $lines[$line])) {
893 push(@res, $rawlines[$line]);
942 my $line = $rawlines[$linenr - 1];
944 if ($linenr == $first_line and $line =~ m@^.\s*\*@) {
947 if ($line =~ m@/\*@) {
953 $current_comment .= $line . "\n" if ($in_comment);
954 if ($line =~ m@\*/@) {
978 my $line;
980 $line = $rawlines[$offset++];
981 next if (defined($line) && $line =~ /^-/);
985 return $line;
1218 my ($possible, $line) = @_;
1238 warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
1249 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
1255 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
1260 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
1275 my $line;
1277 $line = "$prefix$_[0]:$_[1]: $_[2]\n";
1279 $line = "$prefix$_[0]: $_[2]\n";
1281 $line = (split('\n', $line))[0] . "\n" if ($terse);
1283 push(our @report, $line);
1339 my ($line) = @_;
1343 my $opens = $line =~ tr/\(/\(/;
1344 my $closes = $line =~ tr/\)/\)/;
1352 my $len = length($line);
1355 my $string = substr($line, $pos);
1358 } elsif (substr($line, $pos, 1) eq '(') {
1420 my $line;
1423 $line = $rawline;
1478 $line = sanitise_line($rawline);
1480 push(@lines, $line);
1483 $realcnt-- if ($line =~ /^(?:\+| |$)/);
1491 if ($setup_docs && $line =~ /^\+/) {
1492 push(@setup_docs, $line);
1500 foreach my $line (@lines) {
1506 if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) {
1527 } elsif ($line =~ /^( |\+|$)/) {
1535 ($prevline, $stashline) = ($stashline, $line);
1555 if ($line =~ /^diff --git.*?(\S+)$/) {
1559 } elsif ($line =~ /^\+\+\+\s+(\S+)/) {
1587 if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
1596 if ($line =~ /^\s*signed-off-by:/i) {
1603 $line =~ /^(\s*)($signature_tags)(\s*)(.*)/) {
1644 if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
1652 while ($line =~ m{(?:^|\s)(/\S*)}g) {
1665 if (($realfile =~ /^$/ || $line =~ /^\+/) &&
1693 next if (!$hunk_line || $line =~ /^-/);
1696 if ($line =~ /^\+.*\015/) {
1712 $line =~ /.\s*config\s+/) {
1748 ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) {
1765 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
1767 … !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ ||
1768 $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
1782 if ($line =~ /^\+\s*"/ &&
1797 …if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file…
1804 if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) {
1805 my $herevet = "$here\n" . cat_vet($line) . "\n";
1809 if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) {
1810 my $herevet = "$here\n" . cat_vet($line) . "\n";
1851 $line =~ /^\+([ \t]*)/;
1867 if ($line =~ /^\+.*\*[ \t]*\)[ \t]+/) {
1877 if ($rawline =~ /^\+ / && $line !~ /\+ *(?:$;|#|$Ident:)/) {
1893 if ($line =~ /__builtin_bfin_csync/) {
1894 my $herevet = "$here\n" . cat_vet($line) . "\n";
1898 if ($line =~ /__builtin_bfin_ssync/) {
1899 my $herevet = "$here\n" . cat_vet($line) . "\n";
1909 $realcnt && $line =~ /.\s*\S/) {
1986 if ($line=~/\bswitch\s*\(.*\)/) {
2009 if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
2014 if ($line =~ /^\+\t{6,}/) {
2055 …if ($line =~ /\b(?:(?:if|while|for)\s*\(|do\b)/ && $line !~ /^.\s*#/ && $line !~ /\}\s*while\s*/) {
2145 my $opline = $line; $opline =~ s/^./ /;
2158 if ($line=~/^[^\+]/) {next;}
2162 if ($line =~ /^.\s*$Declare\s*$/) {
2165 } elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
2173 if ($line =~ /^.\s*$Modifier\s*$/) {
2176 } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
2184 if ($line =~ /^.\s*{/ &&
2205 if ($line =~ m{//}) {
2210 $line =~ s@//.*@@;
2247 ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ ||
2248 $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) {
2259 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
2265 if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) {
2272 if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
2279 if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
2286 if ($line =~ /\bstruct\s+pci_device_id\s+\w+\s*\[\s*\]\s*\=\s*\{/) {
2293 if ($line =~ /\btypedef\s/ &&
2294 $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
2295 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
2296 $line !~ /\b$typeTypedefs\b/ &&
2297 $line !~ /\b__bitwise(?:__|)\b/) {
2304 while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
2322 while ($line =~ m{(\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident))}g) {
2350 if ($line =~ /\bLINUX_VERSION_CODE\b/) {
2356 if ($line =~ /\bprintk_ratelimit\s*\(/) {
2366 if ($line =~ /\bprintk\((?!KERN_)\s*"/) {
2387 if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
2388 !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
2394 if ($line =~ /^.\s*{/ &&
2401 if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) {
2410 while ($line =~ /(.*?\s)\[/g) {
2421 while ($line =~ /($Ident)\s+\(/g) {
2423 my $ctx_before = substr($line, 0, $-[1]);
2452 if (!($line=~/\#\s*include/)) {
2634 if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
2656 if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
2657 $line =~ /do{/) {
2664 if ($line =~ /}(?!(?:,|;|\)))\S/) {
2670 if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
2674 if ($line =~ /\s\]/) {
2680 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
2681 $line !~ /for\s*\(\s+;/) {
2685 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
2686 $line !~ /for\s*\(.*;\s+\)/ &&
2687 $line !~ /:\s+\)/) {
2693 if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
2694 !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
2724 if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) {
2733 if ($line=~/\b(if|while|for|switch)\(/) {
2739 if ($line =~ /do\s*(?!{)/) {
2761 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
2794 if ($line =~ /
2810 if ($line =~ /^.\s*(?:}\s*)?else\b(.*)/) {
2819 if ($line =~ /}\s*if\b/) {
2825 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
2826 $line !~ /\G(?:
2837 if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and
2843 if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and
2866 if ($line=~/\#\s*define.*\\\s$/) {
2893 $line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
2972 if ($realfile eq 'vmlinux.lds.h' && $line =~ /(?:(?:^|\s)$Ident\s*=|=\s*$Ident(?:\s|$))/) {
2978 if ($line =~ /(^.*)\bif\b/ && $1 !~ /else\s*$/) {
3041 $line =~ /\b(if|while|for|else)\b/) {
3045 if (substr($line, 0, $-[0]) =~ /(\}\s*)$/) {
3105 if ($line =~ /\b$func\b/) {
3113 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
3119 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
3128 if ($line =~ /\bkfree\(\Q$expr\E\);/) {
3136 if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
3143 if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) {
3147 … "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
3152 if ($line =~ /\bmsleep\s*\((\d+)\);/) {
3155 … "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
3167 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
3173 if ($line =~ /^.\s*(struct\s+mutex|spinlock_t)\s+\S+;/ ||
3174 $line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
3182 …if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\…
3189 …if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@inc…
3195 if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
3202 if ($line =~ /\b$Type\s+$Inline\b/ ||
3203 $line =~ /\b$Inline\s+$Storage\b/) {
3209 if ($line =~ /\b(__inline__|__inline)\b/) {
3215 if ($line =~ /\b__attribute__\s*\(\s*\(.*\bpacked\b/) {
3221 if ($line =~ /\b__attribute__\s*\(\s*\(.*aligned/) {
3227 if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf/) {
3233 if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
3239 if ($line =~ /\bsizeof\s*\(\s*\&/) {
3333 if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) {
3339 if ($line =~ /;\s*;\s*$/) {
3345 if ($line =~ /__FUNCTION__/) {
3351 if ($line =~ /\byield\s*\(\s*\)/) {
3357 if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
3363 if ($line =~ /\b((simple|strict)_(strto(l|ll|ul|ull)))\s*\(/) {
3369 if ($line =~ /^.\s*__initcall\s*\(/) {
3412 if ($line !~ /\bconst\b/ &&
3413 $line =~ /\bstruct\s+($struct_ops)\b/) {
3421 if ($line =~ /\bNR_CPUS\b/ &&
3422 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
3423 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
3424 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
3425 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
3426 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
3434 while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
3445 if ($line =~ /\bin_atomic\s*\(/) {
3456 if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
3457 $line =~ /__lockdep_no_validate__\s*\)/ ) {
3466 if ($line =~ /debugfs_create_file.*S_IWUGO/ ||
3467 $line =~ /DEVICE_ATTR.*S_IWUGO/ ) {