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:
Daniel P. Berrangé 2025-05-12 18:11:58 +01:00
parent 66411ab48b
commit 619bf37594

View file

@ -1691,8 +1691,9 @@ sub process {
);
unless (grep { /^$tag$/ } @permitted) {
ERROR("Tag $tag not permitted in QEMU code, valid " .
"choices are: " . join(", ", @permitted));
ERROR("Tag $tag not permitted in QEMU code, " .
"valid choices are: " .
join(", ", @permitted));
}
}
@ -3139,8 +3140,9 @@ sub process {
ERROR("Error messages should not contain newlines\n" . $herecurr);
}
# Continue checking for error messages that contains newlines. This
# check handles cases where string literals are spread over multiple lines.
# Continue checking for error messages that contains newlines.
# This check handles cases where string literals are spread
# over multiple lines.
# Example:
# error_report("Error msg line #1"
# "Error msg line #2\n");
@ -3148,8 +3150,9 @@ sub process {
my $continued_str_literal = qr{\+\s*\".*\"};
if ($rawline =~ /$quoted_newline_regex/) {
# Backtrack to first line that does not contain only a quoted literal
# and assume that it is the start of the statement.
# Backtrack to first line that does not contain only
# a quoted literal and assume that it is the start
# of the statement.
my $i = $linenr - 2;
while (($i >= 0) & $rawlines[$i] =~ /$continued_str_literal/) {