mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
scripts/checkpatch.pl: fix various indentation mistakes
Various checks in the code were under-indented relative to other surrounding code. Some places used 4-space indents instead of single tab, while other places simply used too few tabs. Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
66411ab48b
commit
619bf37594
1 changed files with 53 additions and 50 deletions
|
@ -1691,8 +1691,9 @@ sub process {
|
||||||
);
|
);
|
||||||
|
|
||||||
unless (grep { /^$tag$/ } @permitted) {
|
unless (grep { /^$tag$/ } @permitted) {
|
||||||
ERROR("Tag $tag not permitted in QEMU code, valid " .
|
ERROR("Tag $tag not permitted in QEMU code, " .
|
||||||
"choices are: " . join(", ", @permitted));
|
"valid choices are: " .
|
||||||
|
join(", ", @permitted));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3139,8 +3140,9 @@ sub process {
|
||||||
ERROR("Error messages should not contain newlines\n" . $herecurr);
|
ERROR("Error messages should not contain newlines\n" . $herecurr);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Continue checking for error messages that contains newlines. This
|
# Continue checking for error messages that contains newlines.
|
||||||
# check handles cases where string literals are spread over multiple lines.
|
# This check handles cases where string literals are spread
|
||||||
|
# over multiple lines.
|
||||||
# Example:
|
# Example:
|
||||||
# error_report("Error msg line #1"
|
# error_report("Error msg line #1"
|
||||||
# "Error msg line #2\n");
|
# "Error msg line #2\n");
|
||||||
|
@ -3148,8 +3150,9 @@ sub process {
|
||||||
my $continued_str_literal = qr{\+\s*\".*\"};
|
my $continued_str_literal = qr{\+\s*\".*\"};
|
||||||
|
|
||||||
if ($rawline =~ /$quoted_newline_regex/) {
|
if ($rawline =~ /$quoted_newline_regex/) {
|
||||||
# Backtrack to first line that does not contain only a quoted literal
|
# Backtrack to first line that does not contain only
|
||||||
# and assume that it is the start of the statement.
|
# a quoted literal and assume that it is the start
|
||||||
|
# of the statement.
|
||||||
my $i = $linenr - 2;
|
my $i = $linenr - 2;
|
||||||
|
|
||||||
while (($i >= 0) & $rawlines[$i] =~ /$continued_str_literal/) {
|
while (($i >= 0) & $rawlines[$i] =~ /$continued_str_literal/) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue