mirror of https://gitee.com/openkylin/qemu.git
checkpatch: warn about qemu/queue.h head structs that are not typedef-ed
These are just like any other struct or union, so they should have CamelCase typedefs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
eae3eb3e18
commit
50db69a15f
|
@ -2310,6 +2310,11 @@ sub process {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($line =~ /^.\s*(Q(?:S?LIST|SIMPLEQ|TAILQ)_HEAD)\s*\(\s*[^,]/ &&
|
||||||
|
$line !~ /^.typedef/) {
|
||||||
|
ERROR("named $1 should be typedefed separately\n" . $herecurr);
|
||||||
|
}
|
||||||
|
|
||||||
# Need a space before open parenthesis after if, while etc
|
# Need a space before open parenthesis after if, while etc
|
||||||
if ($line=~/\b(if|while|for|switch)\(/) {
|
if ($line=~/\b(if|while|for|switch)\(/) {
|
||||||
ERROR("space required before the open parenthesis '('\n" . $herecurr);
|
ERROR("space required before the open parenthesis '('\n" . $herecurr);
|
||||||
|
|
Loading…
Reference in New Issue