Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346418
b: refs/heads/master
c: 6cd7f38
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Dec 18, 2012
1 parent 6fede8a commit 49e8305
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03df4b51f33e1fdd35fe7bc19f1f450726395207
refs/heads/master: 6cd7f3869c925622bbf420e1107a026d91dbd7f2
9 changes: 6 additions & 3 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
my @ignore = ();
my $help = 0;
my $configuration_file = ".checkpatch.conf";
my $max_line_length = 80;

sub help {
my ($exitcode) = @_;
Expand All @@ -51,6 +52,7 @@ sub help {
-f, --file treat FILE as regular source file
--subjective, --strict enable more subjective tests
--ignore TYPE(,TYPE2...) ignore various comma separated message types
--max-line-length=n set the maximum line length, if exceeded, warn
--show-types show the message "types" in the output
--root=PATH PATH to the kernel tree root
--no-summary suppress the per-file summary
Expand Down Expand Up @@ -107,6 +109,7 @@ sub help {
'strict!' => \$check,
'ignore=s' => \@ignore,
'show-types!' => \$show_types,
'max-line-length=i' => \$max_line_length,
'root=s' => \$root,
'summary!' => \$summary,
'mailback!' => \$mailback,
Expand Down Expand Up @@ -1760,15 +1763,15 @@ sub process {
# check we are in a valid source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);

#80 column limit
#line length limit
if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
$rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
!($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ ||
$line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
$length > 80)
$length > $max_line_length)
{
WARN("LONG_LINE",
"line over 80 characters\n" . $herecurr);
"line over $max_line_length characters\n" . $herecurr);
}

# Check for user-visible strings broken across lines, which breaks the ability
Expand Down

0 comments on commit 49e8305

Please sign in to comment.