qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Who maintains checkpatch.pl now?


From: Paolo Bonzini
Subject: Re: [Qemu-devel] Who maintains checkpatch.pl now?
Date: Fri, 25 Nov 2011 10:26:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 11/25/2011 04:17 AM, Peter Chubb wrote:
If I fix the problem as in the appended patch, I start seeing other
complaints:

ERROR: space prohibited after that '*' (ctx:WxW)
+#define PRIO_PER_WORD (sizeof (uint32_t) * 8 / 4)
                                           ^

This was fixed recently in upstream Linux checkpatch, I posted a patch. I'm ambivalent about the patch below; it's fine but perhaps we should fix sizeof occurrences followed by a space instead. But it's just a warning.

Blue Swirl, can you please add yourself as checkpatch maintainer (in Odd Fixes status, I guess)?

Paolo

Index: qemu-working/scripts/checkpatch.pl
===================================================================
--- qemu-working.orig/scripts/checkpatch.pl     2011-11-10 10:16:43.215022488 
+1100
+++ qemu-working/scripts/checkpatch.pl  2011-11-25 14:02:30.908358997 +1100
@@ -1953,21 +1953,21 @@ sub process {
                }

  # check for spaces between functions and their parentheses.
                while ($line =~ /($Ident)\s+\(/g) {
                        my $name = $1;
                        my $ctx_before = substr($line, 0, $-[1]);
                        my $ctx = "$ctx_before$name";

                        # Ignore those directives where spaces_are_  permitted.
                        if ($name =~ /^(?:
-                               if|for|while|switch|return|case|
+                               if|for|while|switch|return|case|sizeof|
                                volatile|__volatile__|
                                __attribute__|format|__extension__|
                                asm|__asm__)$/x)
                        {

                        # cpp #define statements have non-optional spaces, ie
                        # if there is a space between the name and the open
                        # parenthesis it is simply not a parameter group.
                        } elsif ($ctx_before =~ /^.\s*\#\s*define\s*$/) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]