Avoid triggering on
typedef struct BlockJobDriver BlockJobDriver;
or
struct BlockJobDriver {
Cc: John Snow <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3afa19a..1f1c9d3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2498,8 +2498,8 @@ sub process {
VMStateDescription|
VMStateInfo}x;
if ($line !~ /\bconst\b/ &&
- $line =~ /\b($struct_ops)\b/) {
- ERROR("struct $1 should normally be const\n" .
+ $line =~ /\b($struct_ops)\b.*=/) {
+ ERROR("initializer for struct $1 should normally be
const\n" .
$herecurr);
}
--
2.7.4