scripts/checkpatch.pl: fixup

Change-Id: I76a7f5fd446a9f40d8294f03d2c355273af59905
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This commit is contained in:
Rohit Vaswani 2013-01-29 19:39:06 -08:00 committed by Stephen Boyd
parent fa79a44270
commit b45143752d

View file

@ -1960,11 +1960,6 @@ sub process {
"unnecessary whitespace before a quoted newline\n" . $herecurr);
}
# check for spaces before a quoted newline
if ($rawline =~ /^.*\".*\s\\n/) {
WARN("unnecessary whitespace before a quoted newline\n" . $herecurr);
}
# check for adding lines without a newline.
if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
WARN("MISSING_EOF_NEWLINE",
@ -2052,12 +2047,6 @@ sub process {
"please, no spaces at the start of a line\n" . $herevet);
}
# check for space before tabs.
if ($rawline =~ /^\+/ && $rawline =~ / \t/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
WARN("please, no space before tabs\n" . $herevet);
}
# check we are in a valid C source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c)$/);
@ -3092,18 +3081,18 @@ sub process {
{
}
# Flatten any obvious string concatentation.
while ($dstat =~ s/("X*")\s*$Ident/$1/ ||
$dstat =~ s/$Ident\s*("X*")/$1/)
{
}
# Extremely long macros may fall off the end of the
# available context without closing. Give a dangling
# backslash the benefit of the doubt and allow it
# to gobble any hanging open-parens.
$dstat =~ s/\(.+\\$/1/;
# Flatten any obvious string concatentation.
while ($dstat =~ s/("X*")\s*$Ident/$1/ ||
$dstat =~ s/$Ident\s*("X*")/$1/)
{
}
my $exceptions = qr{
$Declare|
module_param_named|
@ -3463,11 +3452,6 @@ sub process {
"storage class should be at the beginning of the declaration\n" . $herecurr)
}
# Check that the storage class is at the beginning of a declaration
if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
WARN("storage class should be at the beginning of the declaration\n" . $herecurr)
}
# check the location of the inline attribute, that it is between
# storage class and type.
if ($line =~ /\b$Type\s+$Inline\b/ ||