qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl...
@ 2015-02-02 20:22 Peter Maydell
  2015-02-03 10:03 ` Dr. David Alan Gilbert
  2015-02-09 12:18 ` [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier" Christian Borntraeger
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2015-02-02 20:22 UTC (permalink / raw)
  To: QEMU Developers

The following patch file (a cut down lump of an actual change
I was making) seems to cause scripts/checkpatch.pl to hang.
I find that script too opaque to try to debug, but I post the
offending input here in case anybody else wishes to investigate.

====begin====
commit 4b3cf48c7fa455eb3b31dc844c959964e750a025
Author: Peter Maydell <peter.maydell@linaro.org>
Date:   Mon Feb 2 18:47:16 2015 +0000

    This patch will hang checkpatch.pl.

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 1110a7e..ab6a93c 100644
@@ -7218,13 +7325,13 @@ static inline int float ## s ##
_compare_internal(float ## s a, float ## s b,\
                                                                              \
 int float ## s ## _compare(float ## s a, float ## s b, float_status *status) \
 {                                                                            \
-    return float ## s ## _compare_internal(a, b, 0 STATUS_VAR);              \
+    return float ## s ## _compare_internal(a, b, 0, status);              \
 }                                                                            \
                                                                              \
 int float ## s ## _compare_quiet(float ## s a, float ## s b,                 \
                                  float_status *status)                       \
 {                                                                            \
-    return float ## s ## _compare_internal(a, b, 1 STATUS_VAR);              \
+    return float ## s ## _compare_internal(a, b, 1, status);              \
 }

 COMPARE(32, 0xff)
====endit====

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl...
  2015-02-02 20:22 [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl Peter Maydell
@ 2015-02-03 10:03 ` Dr. David Alan Gilbert
  2015-02-09 12:18 ` [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier" Christian Borntraeger
  1 sibling, 0 replies; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2015-02-03 10:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

* Peter Maydell (peter.maydell@linaro.org) wrote:
> The following patch file (a cut down lump of an actual change
> I was making) seems to cause scripts/checkpatch.pl to hang.
> I find that script too opaque to try to debug, but I post the
> offending input here in case anybody else wishes to investigate.

That's entertaining; observations:
   1) The kernel's checkpatch doesn't hang on it (latest 3.19-rc6)
   2) Ours hangs in the annotate_values function, repeatedly going
around:
main::annotate_values(scripts/checkpatch.pl:859):
859:                    @av_paren_type = ('E') if ($#av_paren_type < 0);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:860):
860:                    print " <" . join('', @av_paren_type) .
861:                                    "> <$type> <$av_pending>" if ($dbg_values > 1);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:862):
862:                    if ($cur =~ /^(\s+)/o) {
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:879):
879:                            print "MODIFIER($1)\n" if ($dbg_values > 1);
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:880):
880:                            $type = 'T';
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1040):
1040:                   if (defined $1) {
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1041):
1041:                           $cur = substr($cur, length($1));
  DB<2> 
main::annotate_values(scripts/checkpatch.pl:1042):
1042:                           $res .= $type x length($1);

$1=
$cur=float ## s ## _compare_quiet(float ## s a, float ## s b,                 \
$type=T
$res=ETTTT

    3) our annotate_values function is the same as the kernels except
       for one char difference in the 'cast' part, which doesn't fix it.

Dave

> ====begin====
> commit 4b3cf48c7fa455eb3b31dc844c959964e750a025
> Author: Peter Maydell <peter.maydell@linaro.org>
> Date:   Mon Feb 2 18:47:16 2015 +0000
> 
>     This patch will hang checkpatch.pl.
> 
> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
> index 1110a7e..ab6a93c 100644
> @@ -7218,13 +7325,13 @@ static inline int float ## s ##
> _compare_internal(float ## s a, float ## s b,\
>                                                                               \
>  int float ## s ## _compare(float ## s a, float ## s b, float_status *status) \
>  {                                                                            \
> -    return float ## s ## _compare_internal(a, b, 0 STATUS_VAR);              \
> +    return float ## s ## _compare_internal(a, b, 0, status);              \
>  }                                                                            \
>                                                                               \
>  int float ## s ## _compare_quiet(float ## s a, float ## s b,                 \
>                                   float_status *status)                       \
>  {                                                                            \
> -    return float ## s ## _compare_internal(a, b, 1 STATUS_VAR);              \
> +    return float ## s ## _compare_internal(a, b, 1, status);              \
>  }
> 
>  COMPARE(32, 0xff)
> ====endit====
> 
> thanks
> -- PMM
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"
  2015-02-02 20:22 [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl Peter Maydell
  2015-02-03 10:03 ` Dr. David Alan Gilbert
@ 2015-02-09 12:18 ` Christian Borntraeger
  2015-02-09 14:31   ` Paolo Bonzini
  1 sibling, 1 reply; 6+ messages in thread
From: Christian Borntraeger @ 2015-02-09 12:18 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Andy Whitcroft, Christian Borntraeger, qemu-devel, dgilbert

From: Andy Whitcroft <apw@canonical.com>

checkpatch currently loops on fpu/softfloat.c
Turns out this is fixed in the Linux version of checkpatch.

So this is a port of Andy Whitcrofts fix from Linux,
Original commit was commit 89a883530fe7 ("checkpatch: ## is not a
valid modifier")

Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 scripts/checkpatch.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5df61f9..8635f4c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1061,7 +1061,9 @@ sub possible {
 			case|
 			else|
 			asm|__asm__|
-			do
+			do|
+			\#|
+			\#\#|
 		)(?:\s|$)|
 		^(?:typedef|struct|enum)\b
 	    )}x;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"
  2015-02-09 12:18 ` [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier" Christian Borntraeger
@ 2015-02-09 14:31   ` Paolo Bonzini
  2015-02-09 15:08     ` Christian Borntraeger
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2015-02-09 14:31 UTC (permalink / raw)
  To: Christian Borntraeger, Peter Maydell; +Cc: Andy Whitcroft, qemu-devel, dgilbert



On 09/02/2015 13:18, Christian Borntraeger wrote:
> From: Andy Whitcroft <apw@canonical.com>
> 
> checkpatch currently loops on fpu/softfloat.c
> Turns out this is fixed in the Linux version of checkpatch.
> 
> So this is a port of Andy Whitcrofts fix from Linux,
> Original commit was commit 89a883530fe7 ("checkpatch: ## is not a
> valid modifier")

I think you need to send it as a toplevel patch for Peter to pick it up.

Paolo

> Cc: Andy Whitcroft <apw@canonical.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  scripts/checkpatch.pl | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 5df61f9..8635f4c 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1061,7 +1061,9 @@ sub possible {
>  			case|
>  			else|
>  			asm|__asm__|
> -			do
> +			do|
> +			\#|
> +			\#\#|
>  		)(?:\s|$)|
>  		^(?:typedef|struct|enum)\b
>  	    )}x;
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"
  2015-02-09 14:31   ` Paolo Bonzini
@ 2015-02-09 15:08     ` Christian Borntraeger
  2015-02-09 15:59       ` Don Slutz
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Borntraeger @ 2015-02-09 15:08 UTC (permalink / raw)
  To: Paolo Bonzini, Peter Maydell; +Cc: Andy Whitcroft, qemu-devel, dgilbert

Am 09.02.2015 um 15:31 schrieb Paolo Bonzini:
> 
> 
> On 09/02/2015 13:18, Christian Borntraeger wrote:
>> From: Andy Whitcroft <apw@canonical.com>
>>
>> checkpatch currently loops on fpu/softfloat.c
>> Turns out this is fixed in the Linux version of checkpatch.
>>
>> So this is a port of Andy Whitcrofts fix from Linux,
>> Original commit was commit 89a883530fe7 ("checkpatch: ## is not a
>> valid modifier")
> 
> I think you need to send it as a toplevel patch for Peter to pick it up.

What do you mean? This patch is on top of qemu/master - if I dont messed up.

Christian
> 
> Paolo
> 
>> Cc: Andy Whitcroft <apw@canonical.com>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> ---
>>  scripts/checkpatch.pl | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 5df61f9..8635f4c 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -1061,7 +1061,9 @@ sub possible {
>>  			case|
>>  			else|
>>  			asm|__asm__|
>> -			do
>> +			do|
>> +			\#|
>> +			\#\#|
>>  		)(?:\s|$)|
>>  		^(?:typedef|struct|enum)\b
>>  	    )}x;
>>
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier"
  2015-02-09 15:08     ` Christian Borntraeger
@ 2015-02-09 15:59       ` Don Slutz
  0 siblings, 0 replies; 6+ messages in thread
From: Don Slutz @ 2015-02-09 15:59 UTC (permalink / raw)
  To: Christian Borntraeger, Paolo Bonzini, Peter Maydell
  Cc: Andy Whitcroft, qemu-devel, dgilbert

On 02/09/15 10:08, Christian Borntraeger wrote:
> Am 09.02.2015 um 15:31 schrieb Paolo Bonzini:
>>
>>
>> On 09/02/2015 13:18, Christian Borntraeger wrote:
>>> From: Andy Whitcroft <apw@canonical.com>
>>>
>>> checkpatch currently loops on fpu/softfloat.c
>>> Turns out this is fixed in the Linux version of checkpatch.
>>>
>>> So this is a port of Andy Whitcrofts fix from Linux,
>>> Original commit was commit 89a883530fe7 ("checkpatch: ## is not a
>>> valid modifier")
>>
>> I think you need to send it as a toplevel patch for Peter to pick it up.
> 
> What do you mean? This patch is on top of qemu/master - if I dont messed up.
> 

The patch email headers:

...
Message-ID: <1423484293-46903-1-git-send-email-borntraeger@de.ibm.com>
X-Mailer: git-send-email 1.9.3
In-Reply-To:
<CAFEAcA9dvehzeL1T+BT3N+_GJtGoL4ig_opv7rVT-0eJekLAvg@mail.gmail.com>
References:
<CAFEAcA9dvehzeL1T+BT3N+_GJtGoL4ig_opv7rVT-0eJekLAvg@mail.gmail.com>
...

Say that it is a reply, not a new email thread.

  -Don Slutz


> Christian
>>
>> Paolo
>>
>>> Cc: Andy Whitcroft <apw@canonical.com>
>>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>>> ---
>>>  scripts/checkpatch.pl | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>>> index 5df61f9..8635f4c 100755
>>> --- a/scripts/checkpatch.pl
>>> +++ b/scripts/checkpatch.pl
>>> @@ -1061,7 +1061,9 @@ sub possible {
>>>  			case|
>>>  			else|
>>>  			asm|__asm__|
>>> -			do
>>> +			do|
>>> +			\#|
>>> +			\#\#|
>>>  		)(?:\s|$)|
>>>  		^(?:typedef|struct|enum)\b
>>>  	    )}x;
>>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-09 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 20:22 [Qemu-devel] This patch hunk will hang scripts/checkpatch.pl Peter Maydell
2015-02-03 10:03 ` Dr. David Alan Gilbert
2015-02-09 12:18 ` [Qemu-devel] [PATCH] checkpatch: port fix from kernel "## is not a valid modifier" Christian Borntraeger
2015-02-09 14:31   ` Paolo Bonzini
2015-02-09 15:08     ` Christian Borntraeger
2015-02-09 15:59       ` Don Slutz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).