mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
scripts/checkpatch.pl: fixup
Change-Id: I76a7f5fd446a9f40d8294f03d2c355273af59905 Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
This commit is contained in:
parent
fa79a44270
commit
b45143752d
1 changed files with 7 additions and 23 deletions
|
@ -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)$/);
|
||||
|
||||
|
@ -2858,7 +2847,7 @@ sub process {
|
|||
if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
|
||||
$line !~ /for\s*\(\s+;/ && $line !~ /^\+\s*[A-Z_][A-Z\d_]*\(\s*\d+(\,.*)?\)\,?$/) {
|
||||
ERROR("SPACING",
|
||||
"space prohibited after that open parenthesis '('\n" . $herecurr);
|
||||
"space prohibited after that open parenthesis '('\n" . $herecurr);
|
||||
}
|
||||
if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
|
||||
$line !~ /for\s*\(.*;\s+\)/ &&
|
||||
|
@ -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/ ||
|
||||
|
|
Loading…
Reference in a new issue