]> git.proxmox.com Git - mirror_qemu.git/blobdiff - scripts/checkpatch.pl
fix qemu-system-unicore32 crashing when calling without -kernel
[mirror_qemu.git] / scripts / checkpatch.pl
index 3afa19a766c2ae371ef382dfeee5247d3720c8c1..f0845429342a926aa4691eefefcad92e174ca25f 100755 (executable)
@@ -1754,7 +1754,7 @@ sub process {
                        # Ignore those directives where spaces _are_ permitted.
                        if ($name =~ /^(?:
                                if|for|while|switch|return|case|
-                               volatile|__volatile__|
+                               volatile|__volatile__|coroutine_fn|
                                __attribute__|format|__extension__|
                                asm|__asm__)$/x)
                        {
@@ -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);
                }