Commit e20e718c authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

checkpatch: tweak "struct should normally be const" warning



Avoid triggering on

    typedef struct BlockJobDriver BlockJobDriver;

or

    struct BlockJobDriver {

Cc: John Snow <jsnow@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 39542105
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
		}